erlef / rebar3_hex

Rebar3 Hex library
Apache License 2.0
101 stars 49 forks source link

Offer the user a way to configure a docs command or provider. #182

Closed starbelly closed 3 years ago

starbelly commented 4 years ago

With the latest release of rebar3_hex (v6.10.0) we no longer assume you want to run edoc. This makes sense depending on your preferences, organization, and even BEAM language.

However, most users expect a plugin such as rebar3_hex to handle this all nice and automagic so to speak. We should also strive for parity with mix hex in this regard.

Perhaps something like :

Provider:

{docs, edoc}.

Shell cmd:

{docs, {cmd, "some_cmd_we_shell_out_to", ["-a", "-b", "--output_dir", "docs"]}}.

Just initial thoughts on config, probably a better format for it. Could also do {hex_docs, ...} to keep docs open or if docs is already reserved in rebar3.

Regardless of what one uses to generate docs, we should should check to see if docs dir has been made, etc.

ferd commented 4 years ago

Yeah I'd probably go for hex_docs as a key there (or {hex, [{docs, ...]}) to keep the naming isolated from a broader docs command

starbelly commented 4 years ago

@ferd yeah, keeping isolated to {hex, ...} is surely the best approach.