Skip to content

Latest commit

 

History

History
50 lines (33 loc) · 813 Bytes

File metadata and controls

50 lines (33 loc) · 813 Bytes

ReScript Tools

Install

The rescript package provides the rescript-tools executable:

npm install --save-dev rescript

CLI Usage

rescript-tools --help

Generate documentation

Print JSON:

rescript-tools doc src/EntryPointLibFile.res

Write JSON:

rescript-tools doc src/EntryPointLibFile.res > doc.json

Reanalyze

rescript-tools reanalyze --help

Contributor documentation

Decode JSON

RescriptTools.Docgen in the standard library (@rescript/runtime) decodes the JSON that rescript-tools doc prints:

// Read JSON file and parse with `JSON.parseOrThrow`
json->RescriptTools.Docgen.decodeFromJson