
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
grunt-coffee-react
Advanced tools
This tool is no longer maintained. If you need to transition your codebase from it, a codemod is available to do so: cjsx-codemod
This project started as a way for me to explore how JSX could fit into Coffeescript syntax, as a quickly hacked together prototype. While I never really promoted it, it quickly took on a life of its own, and before long people were asking for it to support all kinds of different use cases. On top of that I had no experience writing parsers, so the result is something with insurmountable limitations.
As I eventually stopped using Coffeescript I ended up neglecting this project, but as people were using it I didn't want to kill it. I really should have, however, because it meant that people were using a crappy, ill-conceived, unmaintained tool. Now, long overdue, I'm putting it out to pasture.
Original readme follows:
Compile coffee-react-transform CJSX files to JavaScript.
This plugin requires Grunt ~0.4.0
Version 1.0 and higher of this plugin are only compatible with React 0.11.2 and higher
note
npm install grunt-coffee-react --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-coffee-react');
Run this task with the grunt cjsx command.
Task targets, files and options may be specified according to the grunt Configuring tasks guide.
Type: String
Default: linefeed
Concatenated files will be joined on this string.
Type: boolean
Compile the JavaScript without the top-level function safety wrapper.
Type: boolean
Default: false
When compiling multiple CJSX files into a single .js file, concatenate first.
Type: boolean
Default: false
Compile JavaScript and create a .map file linking it to the CJSX source. When compiling multiple .coffee files to a single .js file, concatenation occurs as though the 'join' option is enabled
Type: String
Default: (same path as your compiled js files)
Generated source map files will be created here.
Type: String
Default: '.src.coffee'
Resulting extension when joining multiple CJSX files.
cjsx: {
compile: {
files: {
'path/to/result.js': 'path/to/source.coffee', // 1:1 compile
'path/to/another.js': ['path/to/sources/*.cjsx', 'path/to/more/*.coffee'] // compile and concat into single file
}
},
compileBare: {
options: {
bare: true
},
files: {
'path/to/result.js': 'path/to/source.coffee', // 1:1 compile
'path/to/another.js': ['path/to/sources/*.cjsx', 'path/to/more/*.coffee'] // compile and concat into single file
}
},
compileJoined: {
options: {
join: true
},
files: {
'path/to/result.js': 'path/to/source.coffee', // 1:1 compile, identical output to join = false
'path/to/another.js': ['path/to/sources/*.cjsx', 'path/to/more/*.coffee'] // concat then compile into single file
}
},
compileWithMaps: {
options: {
sourceMap: true
},
files: {
'path/to/result.js': 'path/to/source.coffee', // 1:1 compile
'path/to/another.js': ['path/to/sources/*.cjsx', 'path/to/more/*.coffee'] // concat then compile into single file
}
},
compileWithMapsDir: {
options: {
sourceMap: true,
sourceMapDir: 'path/to/maps/' // source map files will be created here
},
files: {
'path/to/result.js': 'path/to/source.coffee'
}
},
glob_to_multiple: {
expand: true,
flatten: true,
cwd: 'path/to',
src: ['*.coffee'],
dest: 'path/to/dest/',
ext: '.js'
}
}
For more examples on how to use the expand API to manipulate the default dynamic path construction in the glob_to_multiple examples, see "Building the files object dynamically" in the grunt wiki entry Configuring Tasks.
FAQs
Compile CJSX files to JavaScript.
The npm package grunt-coffee-react receives a total of 168 weekly downloads. As such, grunt-coffee-react popularity was classified as not popular.
We found that grunt-coffee-react demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.