reason-rt-binding-generator
reason-rt-binding-generator copied to clipboard
Reason binding generator for react-toolbox
Reason bindings generator for react-toolbox
This tool generates the Reason bindings for
react-toolbox. It works on the JSON output
generated by typedoc. It extracts all components (that
extend React.Component<P,S>), and generates .re modules (and .rei
module signatures), getting all props from the first type parameter.
Prerequisites
-
If you don't have the OCaml compiler (or OPAM) installed, please install it.
opam install jbuilder yojson -
Install reason-cli.
-
Install JS dependencies:
yarn install
How to (re)generate bindings
yarn typedoc
jbuilder clean
jbuilder runtest
yarn refmt
Check the output subdirectory: You should find reactToolbox.re,
reactToolbox.rei, reactToolboxBundled.re, reactToolboxBundled.rei.