An open API service indexing awesome lists of open source software.

https://github.com/jchavarri/genbindings

Babel plugin to auto-generate Reason bindings from JavaScript+Flow annotated code.
https://github.com/jchavarri/genbindings

Last synced: 3 months ago
JSON representation

Babel plugin to auto-generate Reason bindings from JavaScript+Flow annotated code.

Awesome Lists containing this project

README

        

# genBindings

Babel plugin to generate Reason bindings based on exported values with the `// @genBindings` annotation.

:warning: Status: Early alpha. Only a few happy paths work at the moment. :warning:

## Requirements

The plugin can be used in projects that are configured with:

- Babel 6
- Flow 0.82

Flow binary (`flow`) is expected to be available in `node_modules/.bin/flow` (no customization via config yet).

## Installation

```sh
$ npm install --save-dev jchavarri/genBindings
```

Add `genBindings` to `.babelrc`.

## Usage

### Via `.babelrc` (Recommended)

**.babelrc**

```json
{
"plugins": ["genBindings"]
}
```

### Via CLI

```sh
$ babel --plugins genBindings script.js
```

### Via Node API

```javascript
require('babel').transform('code', {
plugins: ['genBindings']
});
```