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

https://github.com/lasso-js/lasso-jsx

Plugin to support compiling JSX files
https://github.com/lasso-js/lasso-jsx

Last synced: 3 months ago
JSON representation

Plugin to support compiling JSX files

Awesome Lists containing this project

README

          

lasso-jsx
==============

This Node.js module is a plugin for the [Lasso.js](https://github.com/lasso-js/lasso), that provides support to precompile [Facebook React](http://facebook.github.io/react/) JSX files with the `.jsx` extension into JavaScript.

## Install

```sh
$ npm install --save lasso-jsx
```

## Usage

In your dependencies list in `browser.json`, just go ahead and all your source .jsx files
```js
[
"main.jsx",
"components/toolbar.jsx",
...
]
```
And add `lasso-jsx` as the required plugin in `lasso-config.json`

```js
{
"plugins": [
"lasso-jsx"
...
],
...
}
```

The JSX directive `/** @jsx React.DOM */` is automatically prepended to `.jsx` files if missing.