astrada / reason-rt-binding-generator

Reason binding generator for react-toolbox

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

Reason binding generator for react-toolbox

License:MIT License


Languages

Language:OCaml 100.0%Language:Shell 0.0%