A toolset for Reason / OCaml related documentation generation
- Clone Bucklescript somewhere on your machine (for example at
~/projects/bucklescript
). - Follow the build instructions in
CONTRIBUTING.md
in the Bucklescript repository. - Install esy with
npm install -g esy
.
Make sure you followed all the steps in the Requirements section first. Once that is done, you can build the bs-doc
tool (this is a temporary name).
$ esy
And finally, run the tool to generate the documentation artefacts (e.g. JSON):
$ esy x -- bs-doc --output=_output --bs-project-dir=~/projects/bucklescript
This will generate JSON and odoc files in the _output
folder. When regenerating the files, make sure to remove the previously created files.
For additional configuration options see:
$ esy x -- bs-doc --help
Currently the JSON generation is implemented in a forked version of odoc.
To work with the JSON generator, clone the forked version of odoc on your machine and build it with esy esy @ocaml-4.06
.
To use the modified version of odoc, you can update the package.json
file in this repository to link to the cloned odoc
folder.