npm install --save-dev @rescript/tools
rescript-tools --help
Print JSON:
rescript-tools doc src/EntryPointLibFile.res
Write JSON:
rescript-tools doc src/EntryPointLibFile.res > doc.json
rescript-tools reanalyze --help
Add to bs-dev-dependencies
:
"bs-dev-dependencies": ["@rescript/tools"]
// Read JSON file and parse with `Js.Json.parseExn`
json->RescriptTools.Docgen.decodeFromJson