Skip to content

Instantly share code, notes, and snippets.

@fgnass
Created April 3, 2015 10:33
Show Gist options
  • Save fgnass/6909bf3faf3f775a9479 to your computer and use it in GitHub Desktop.
Save fgnass/6909bf3faf3f775a9479 to your computer and use it in GitHub Desktop.
Making node-dev work with JSX
// install node-jsx in a separate module
require('./install-jsx')
// require a jsx file
require('./test')
// keep node running ...
setInterval(function() {}, 100000)
require('node-jsx').install()
{
"name": "node-dev-jsx",
"version": "0.0.0",
"description": "",
"main": "index.js",
"dependencies": {
"node-jsx": "^0.12.4",
"react": "^0.13.1"
}
}
/** @jsx React.DOM */
var React = require('react');
function Test() {
return 'jsx';
}
module.exports = <Test />;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment