Skip to main content

Documentation

Mélodium is capable of generating documentation for any Mélodium program. The melodium doc command extracts the documentation of the elements making up a program, as well as their characteristics, and renders the whole thing in the form of an mdBook project.

Generation of documentation

Documentation for a program can be generated with the doc command, where <file> is the project to be documented (path to the project, .mel file, or .jeu file), and <directory> the location where to write the mdBook:

$ melodium doc --file <file> <directory>

Building with mdBook

To build the documentation and obtain an HTML, PDF, or other version, it is necessary to use mdBook.

With mdBook installed, simply enter the following command to generate the documentation in HTML format, with <directory> as the location where Mélodium wrote the mdBook:

$ mdbook build --open <directory>