Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rescript-association/doc-tools
A toolset for Reason / OCaml related documentation generation
https://github.com/rescript-association/doc-tools
Last synced: about 2 months ago
JSON representation
A toolset for Reason / OCaml related documentation generation
- Host: GitHub
- URL: https://github.com/rescript-association/doc-tools
- Owner: rescript-association
- License: mit
- Created: 2020-03-04T08:06:19.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-04-09T12:09:48.000Z (over 4 years ago)
- Last Synced: 2024-05-11T22:33:57.142Z (4 months ago)
- Language: OCaml
- Size: 78.1 KB
- Stars: 14
- Watchers: 7
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-list - doc-tools - association | 14 | (OCaml)
README
# doc-tools
A toolset for Reason / OCaml related documentation generation
## Requirements
1. Clone [Bucklescript](https://github.com/BuckleScript/bucklescript) somewhere on your machine (for example at `~/projects/bucklescript`).
2. Follow the build instructions in [`CONTRIBUTING.md`](https://github.com/BuckleScript/bucklescript/blob/master/CONTRIBUTING.md) in the Bucklescript repository.
3. Install [esy](https://esy.sh) with `npm install -g esy`.## Generate documentation from Bucklescript modules
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
```## Working on JSON generator
Currently the JSON generation is implemented in a [forked version of odoc](https://github.com/odis-labs/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.