cjsxify
Browserify transform for CJSX (CoffeeScript equivalent of JSX used in React library by Facebook)
Last updated 5 years ago by simon.degraeve .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install cjsxify 
SYNC missed versions from official npm registry.

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.

Current Tags

  • 0.3.0                                ...           latest (5 years ago)

9 Versions

  • 0.3.0                                ...           5 years ago
  • 0.2.6                                ...           5 years ago
  • 0.2.5                                ...           6 years ago
  • 0.2.4                                ...           6 years ago
  • 0.2.3                                ...           6 years ago
  • 0.2.2                                ...           6 years ago
  • 0.2.1                                ...           6 years ago
  • 0.2.0                                ...           6 years ago
  • 0.1.0                                ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 30
Last Day 0
Last Week 3
Last Month 10
Dependencies (4)
Dev Dependencies (1)

Copyright 2014 - 2017 © taobao.org |