Skip to content

Commit

Permalink
Modernize doc generation
Browse files Browse the repository at this point in the history
  • Loading branch information
g-andrade committed Apr 19, 2022
1 parent ce6d388 commit f5ea400
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 39 deletions.
7 changes: 3 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ CLI_ARTIFACT_PATH = _build/escriptize/bin/locus
.PHONY: all build clean check
.PHONY: xref hank-dead-code-cleaner elvis-linter dialyzer
.PHONY: test cover
.PHONY: shell console doc publish cli
.PHONY: shell console doc-dry publish cli

.NOTPARALLEL: check cover test

Expand Down Expand Up @@ -61,11 +61,10 @@ shell:

console: shell

doc: $(REBAR3)
./support/scripts/generate_docs.sh
doc-dry: $(REBAR3)
@$(REBAR3) hex publish docs --dry-run

publish: $(REBAR3)
publish: doc
@$(REBAR3) hex publish

cli: $(REBAR3)
Expand Down
24 changes: 16 additions & 8 deletions rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
]}.

{project_plugins, [
{rebar3_ex_doc, "0.2.8"},
{rebar3_hank, "1.2.2"},
{rebar3_hex, "7.0.1"},
{rebar3_lint, "1.0.1"}
Expand Down Expand Up @@ -91,14 +92,7 @@
]},
{cover_enabled, true},
{cover_opts, [verbose]}
]},

{docs,
[{edoc_opts, [{preprocess, true},
{doclet, edoc_doclet_chunks},
{layout, edoc_layout_chunks},
{dir, "_build/default/lib/locus/doc"}]}
]}
]}
]}.

%% == Hank ==
Expand All @@ -108,3 +102,17 @@
"test/**"
]}
]}.

%% == ex_doc +++

{ex_doc, [
{source_url, <<"https://github.com/g-andrade/locus">>},
{extras, [<<"README.md">>, <<"CHANGELOG.md">>, <<"MIGRATION.md">>, <<"LICENSE">>]},
{main, <<"readme">>},
{proglang, erlang}
]}.
{hex, [
{doc, #{
provider => ex_doc
}}
]}.
4 changes: 0 additions & 4 deletions support/scripts/generate_docs.config

This file was deleted.

23 changes: 0 additions & 23 deletions support/scripts/generate_docs.sh

This file was deleted.

0 comments on commit f5ea400

Please sign in to comment.