/reason-rt-binding-generator

Reason binding generator for react-toolbox

Primary LanguageOCamlMIT LicenseMIT

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

  1. If you don't have the OCaml compiler (or OPAM) installed, please install it.

    opam install jbuilder yojson
    
  2. Install reason-cli.

  3. 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.