Get unlimited public & private packages + package-based permissions with npm Pro.Get started »

cjsx-coffee-brunch

0.0.3 • Public • Published

Coffeescript JSX compile for brunch

cjsx-coffee-brunch

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

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
 
  modules:
    nameCleaner: (path) ->
      path
        # Strip the .cjsx extension from module names 
        .replace(/\.cjsx/'')
 
 
  # 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.

Install

npm i cjsx-coffee-brunch

DownloadsWeekly Downloads

1

Version

0.0.3

License

MIT

Last publish

Collaborators

  • avatar