From what I understand, putting --docs=docs.json in the elm make CLI should save a json version of my module's docs, but using that flag doesn't seem to have any effect.
SSCCE:
$ elm init
```{Elm}
-- src/Main.elm
module Main exposing (main)
{-| Main module
@docs main
}
import Html exposing (text)
{-| main function
-}
main=
text "Hello"
$ elm make src/Main.elm --docs=docs.json
```
> Nothing happens (the module compiles but there are no new json files anywhere)
Did the way you do doc comments change in 0.19? Am I using the CLI wrong somehow? Or is this a bug? I have reproduced it on two different systems (Windows 10 and macOS) with Elm 0.19.0
It seems like it sometimes works on "package" projects. Is it just not possible to build docs for "application" projects? Or do you have to put something special in your elm.json file?
I believe it is not available with "application" for now since they can benefit from having different rules. For example, in a professional setting, I have observed that making doc comments mandatory leads to a lot of {-|-} placed around. So it seems like it'd be valuable to allow partial documentation in this context.
So I'd like to expose the documentation in elm reactor for applications. That way it can take account of the different needs of the codebase. That may involve expanding what is possible from the command line, but I am not certain.
Most helpful comment
I believe it is not available with
"application"for now since they can benefit from having different rules. For example, in a professional setting, I have observed that making doc comments mandatory leads to a lot of{-|-}placed around. So it seems like it'd be valuable to allow partial documentation in this context.So I'd like to expose the documentation in
elm reactorfor applications. That way it can take account of the different needs of the codebase. That may involve expanding what is possible from the command line, but I am not certain.