Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

General improvements #7

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,10 @@ deps
*.plt
erl_crash.dump
tags
doc/*
!doc/style.css
!doc/overview.edoc
!doc/img
!doc/img/*
!doc/img/logo.png
exdoc
17 changes: 15 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,34 @@ test: eunit

eunit: $(REBAR)
$(REBAR) as test eunit

xref: $(REBAR)
$(REBAR) as test xref

dialyzer: $(REBAR)
$(REBAR) as test dialyzer

clean: $(REBAR)
clean: $(REBAR) clean_doc
$(REBAR) clean

clean_doc:
@rm -f doc/*.html
@rm -f doc/erlang.png
@rm -f doc/edoc-info

distclean:
rm -rf _build
rm $(REBAR)

doc: $(REBAR)
$(REBAR) edoc

doc_private: $(REBAR)
$(REBAR) as doc_private edoc

exdoc: $(REBAR)
$(REBAR) ex_doc --output exdoc --formatter html

# dializer

build-plt:
Expand Down
18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Diffy

[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg?logo=apache&logoColor=red)](https://www.apache.org/licenses/LICENSE-2.0)
![Test](https://github.com/zotonic/diffy/workflows/Test/badge.svg)

# Diffy

Diff, Match and Patch implementation for Erlang.

## Introduction
Expand Down Expand Up @@ -30,3 +31,16 @@ Example
Much good info about diff, match and patch can found at
link: http://neil.fraser.name/writing/diff/

## Documentation generation

## EDoc

### Generate public API
`make docs` or `rebar3 edoc`

## Generate private API
`make doc_private` or `rebar3 as doc_private edoc`

#ExDoc

`make exdoc` or `rebar3 ex_doc --output exdoc --formatter html`
Binary file added doc/img/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions doc/overview.edoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
@author Maas-Maarten Zeeman <[email protected]>
@author Marc Worrell
[https://whatwebwhat.com/]
@author Zotonic Team
[http://zotonic.com]
@title diffy
@doc Diff, match patch implementation
@copyright Apache-2.0
@since 2014
71 changes: 71 additions & 0 deletions doc/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
/* standard EDoc style sheet */
body {
font-family: Verdana, Arial, Helvetica, sans-serif;
margin-left: .25in;
margin-right: .2in;
margin-top: 0.2in;
margin-bottom: 0.2in;
color: #000000;
background-color: #ffffff;
}
h1,h2 {
margin-left: -0.2in;
}
div.navbar {
background-color: #add8e6;
padding: 0.2em;
}
h2.indextitle {
padding: 0.4em;
background-color: #add8e6;
}
h3.function,h3.typedecl {
background-color: #add8e6;
padding-left: 1em;
}
div.spec {
margin-left: 2em;

background-color: #eeeeee;
}
a.module {
text-decoration:none
}
a.module:hover {
background-color: #eeeeee;
}
ul.definitions {
list-style-type: none;
}
ul.index {
list-style-type: none;
background-color: #eeeeee;
}

/*
* Minor style tweaks
*/
ul {
list-style-type: square;
}
table {
border-collapse: collapse;
}
td {
padding: 3px;
vertical-align: middle;
}

/*
Tune styles
*/

table[summary="navigation bar"] {
background-image: url('http://zotonic.com/lib/images/logo.png');
background-repeat: no-repeat;
background-position: center;
}

code, p>tt, a>tt {
font-size: 1.2em;
}
37 changes: 33 additions & 4 deletions rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
{zotonic_stdlib, "1.2.3"}
]}.


{profiles, [
{test, [
{deps, [
{proper, "1.2.0"}
{plugins, [
rebar3_proper
]},
{deps, [
{proper, "1.4.0"}
]},

{xref_checks, [
Expand All @@ -24,5 +26,32 @@
no_return
]}
]}
]}
]},
{doc_private, [
{edoc_opts, [
{private, true}
]}
]}
]}.

{project_plugins, [rebar3_hex, rebar3_ex_doc]}.

{edoc_opts, [
{preprocess, true}, {stylesheet, "style.css"}
]}.

{hex, [
{doc, #{provider => ex_doc}}
]}.

{ex_doc, [
{extras, [
{"README.md", #{title => "Overview"}},
{"LICENSE", #{title => "License"}}
]},
{main, "README.md"},
{source_url, "https://github.com/zotonic/diffy"},
{assets, "assets"},
{api_reference, true}
]}.

Loading