React Grails Asset-Pipeline Plugin
A Plugin that adds JSX template precompilation and react assets to the Grails Asset-Pipeline Plugin.
For more information on how to use asset-pipeline, click here.
to your BuildConfig.groovy
If you just want react assets in your app you can either require react (for only react.js) or react-with-jsx (for browser side jsx compilation)
//= require react-with-jsx
there are also seperated packages for jsx only
//= require jsx
or react with addons (without jsx)
//= require react-with-addons
e.g. having a pager.jsx that looks like this
//= require pager/pager.jsx //= require pager/pager-next-button.jsx //= require pager/pager-page-button.jsx //= require pager/pager-prev-button.jsx
which will result in a single compiled JSX Tempalte file with the referenced templates in it.
You can now get rid of browser side JSX and just use the "react" asset.
- add Config.groovy option to change template compilation options
- 2.0 (10 Mai 2015) updated to react 0.13
- enabled harmony transformation
- 1.1 (23 Feb. 2015) added react-with-options package
- 1.0 initial release