0.0.2 • Published 9 years ago

cjsx-react-brunch v0.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

Coffeescript JSX transform for brunch

coffee-react-brunch

Adds React support to brunch by automatically compiling *.cjsx files.

Optional

You can configure react-brunch to automatically insert a react header (# @cjsx React.DOM) into all *.cjsx files. Disabled by default.

Example config.coffee:

exports.config =
  plugins:
    react:
      autoIncludeCommentBlock: yes

  # Usual brunch config stuf...
  files:
    javascripts:
      joinTo: 'app.js'
    stylesheets:
      joinTo: 'app.css'
    templates:
      joinTo: 'app.js'

Usage

Install the plugin via npm with npm install --save coffee-react-brunch.

Or, do manual install:

  • Add "coffee-react-brunch": "x.y.z" to package.json of your brunch app. Pick a plugin version that corresponds to your minor (y) brunch version.
  • If you want to use git version of plugin, add "coffee-react-brunch": "git+ssh://git@github.com:brunch/coffee-react-brunch.git".

Credit

This is based on Paul Miller's javascript-brunch project and Matt McCray's react-brunch and adjusted to compile React (.cjsx) files.