Browserify transform for CJSX (CoffeeScript equivalent of JSX used in React library by Facebook)
npm install cjsxifycjsxify
====
Browserify transform for CJSX (CoffeeScript equivalent of JSX used in React library by Facebook).
coffeescript
@cjsx React.DOM
React = require('react')
Hello = React.createClass
render: ->
Hello, {@props.name}!React.renderComponent( , document.getElementById('hello'))
`Save the snippet above as
main.coffee and then produce a bundle with the following
command: % browserify -t cjsxify main.coffee -o bundle.js
cjsxify is activated for files with either .cjsx extension or # @cjsx React.DOM pragma as a first line for any .coffee file.$3
`bash
npm install cjsxify
`$3
This package is inspired by coffeeify/reactify and use coffee-react-transform to handle cjsx transformation to CoffeeScript`.