cjsx-coffee-brunch
Adds CJSX support to brunch and compile the resulting CoffeeScript.
Last updated 5 years ago by wmdmark .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install cjsx-coffee-brunch 
SYNC missed versions from official npm registry.

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.

Current Tags

  • 0.0.3                                ...           latest (5 years ago)

2 Versions

  • 0.0.3                                ...           5 years ago
  • 0.0.2                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (3)
Dev Dependencies (3)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |