jelly-beam / rebar3_ex_doc

rebar3 plugin for generating docs with ex_doc
Apache License 2.0
43 stars 13 forks source link

add support for the "output" configuration option #36

Closed fredyouhanaie closed 1 year ago

fredyouhanaie commented 1 year ago

Both edoc and ex_doc use the same default output directory (doc/). We can now override the ex_doc default via rebar.config.

starbelly commented 1 year ago

Thank you! ❤️

weiss commented 1 year ago

@fredyouhanaie, thanks for that, I was looking for the same thing. But does it actually work for you? For me, it seems to have no effect, presumably because the rebar.config setting is overridden with the default value (doc) if not specified on the command line?

fredyouhanaie commented 1 year ago

It will not work if you have output defined in your rebar.config file, e,.g

{ex_doc, [ {output, "exdoc"} ]}.

We cannot override the config file with the command line options :-( This is normal behaviour, see issue #35!

Otherwise, it works for me.

weiss commented 1 year ago

Weird, that's precisely the thing that didn't work for me until I removed the code line I referenced above.

I'll have a closer look, thanks.

weiss commented 1 year ago

I can reproduce the problem with Rebar3 3.22.0 on Erlang/OTP 26.0.2 like this:

rebar3 new app example
cd example
echo '{ex_doc, [{output, "exdoc"}]}.' >> rebar.config
echo '{plugins, [rebar3_ex_doc]}.' >> rebar.config
rebar3 ex_doc

I would've expected ending up with an exdoc directory but end up with doc instead.

fredyouhanaie commented 1 year ago

Ah, OK. I had been using an existing project with an older version of rebar3_ex_doc.

Using your example with {plugins, [ {rebar3_ex_doc, "0.2.17"} ] }., I do get the exdoc directory, so something has changed between 0.2.17 and 0.2.18.

Worth continuing this in a separate issue. I'll take a more detailed look tomorrow or at the weekend.

starbelly commented 1 year ago

Issue opened here : https://github.com/starbelly/rebar3_ex_doc/issues/54