Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/wdamron/duo-jsx

react-tools plugin for duo
https://github.com/wdamron/duo-jsx

Last synced: about 2 months ago
JSON representation

react-tools plugin for duo

Awesome Lists containing this project

README

        

# duo-jsx

[react-tools](https://github.com/facebook/react) plugin for [duo](https://github.com/duojs/duo).

## Examples

```sh
$ npm install --save-dev duo-jsx
```

###CLI

```sh
$ duo -u duo-jsx in.js > out.js
```

###Node

```js
var Duo = require('duo'),
jsx = require('duo-jsx');

Duo(__dirname)
.entry('main.js')
.use(jsx())
.run(function (err, src) {
// ...
});
```
##API

```js
var jsx = require('duo-jsx');
```

###jsx([options])

options: ```Object```

Options are passed to react-tools

####options.sourceMap

Type: ```Boolean``` Default: ```false```

Append inline source map at the end of the transformed source.

####options.harmony

Type: ```Boolean``` Default: ```false```

Enable ES6 features.

####options.filename

Type: ```string``` Default: ```source.js```

The output filename for the source map.