Created
April 3, 2015 10:33
-
-
Save fgnass/6909bf3faf3f775a9479 to your computer and use it in GitHub Desktop.
Making node-dev work with JSX
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// install node-jsx in a separate module | |
require('./install-jsx') | |
// require a jsx file | |
require('./test') | |
// keep node running ... | |
setInterval(function() {}, 100000) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require('node-jsx').install() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "node-dev-jsx", | |
"version": "0.0.0", | |
"description": "", | |
"main": "index.js", | |
"dependencies": { | |
"node-jsx": "^0.12.4", | |
"react": "^0.13.1" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** @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