elm-book
elm-book copied to clipboard
Generating ElmBooks based on doc comments
In The Roadmap you write
Generating ElmBooks based on doc comments – the same that are used to generate docs on elm-packages. This could allow published elm packages to automatically have their own ElmBook with example codes turning into live components and no code duplication.
Is this still up for grabs? I'm currently interested in anything related to generating content and am currently investigating different ways of doing so. This task might be a good way to explore various possibilities.
Some technologies I want to explore using this task:
- Elm-codegen - generates code using Elm
- Elm-pen - generates code using Moustache Files & Json
- elm-posix - lets you read & write files using node.js
I actually have already something to show: Checkout this Documentation You find the code here. The steps needed to get to the documentation where the following:
- Create an Elm file containing the documentation (See
ElmBook.Gen.Doc.Module
inside thegenerated
folder) - Create Elm-Book chapters (See
ElmBook.Docs
insrc
) - Copy the created files into the main source code folder (this step is currently missing)
- Create your Elm-Book like usual and include
ElmBook.Docs.chapters
in the list of chapters.
What's missing is the CLI that automates these processes. I'm also not sure if I should create a new repository for this or if it should live inside this repository...?