Generate a README.md from an Elm file.
- Use
{- ... -}
block comments for the readme. The rest is turned into a Markdown elm codeblock. - Run
elm-generate-readme path/to/Readme.elm
{- # Block comments
This block comment will be turned into markdown
-}
{-| Function doc
This will be included in the code block
-}
elmCode : String
elmCode =
List.foldr (++) "" [ "Hello", ", ", "World!" ]
Will be turned into this:
# Block comments
This block comment will be turned into markdown
```elm
{-| Function doc
This will be included in the code block
-}
elmCode : String
elmCode =
List.foldr (++) "" [ "Hello", ", ", "World!" ]
```
- Compile the
Readme.elm
to make sure the examples actually work. - No need to copy code from examples anymore.
- One source of truth
- Install
cabal
viaghcup
(3.6.2.0) - Clone this repository
cd
into the repo- Run
cabal install