Skip to content

Browserify transform for CJSX (CoffeeScript equivalent of JSX used in React library by Facebook)

License

Notifications You must be signed in to change notification settings

SimonDegraeve/cjsxify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cjsxify

Browserify transform for CJSX (CoffeeScript equivalent of JSX used in React library by Facebook).

Usage

# @cjsx React.DOM

React = require('react')

Hello = React.createClass
  render: ->
    <div>Hello, {@props.name}!</div>

React.renderComponent(<Hello name='World' />, 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.

Installation

npm install cjsxify

Thanks

This package is inspired by coffeeify/reactify and use coffee-react-transform to handle cjsx transformation to CoffeeScript. Thanks to the authors for their great work.

About

Browserify transform for CJSX (CoffeeScript equivalent of JSX used in React library by Facebook)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published