node-jsx-babel
v0.14.2
Published
transparently require() jsx from node with babel transform
Downloads
10
Readme
node-jsx-babel
Transparently require()
jsx from node with babel
Breaking changes
This version change default extension from .js
to .jsx
, due to .js
extension overwrite base node parser and will case an exception.
Usage
require('node-jsx-babel').install()
If you want to use a different extension than .jsx
, do:
require('node-jsx-babel').install({extension: '.foo'})
If you want to couple with an additional transform (such as CoffeeScript), do:
var coffee = require('coffee-script');
require('node-jsx-babel').install({
extension: '.coffee',
additionalTransform: function(src) {
return coffee.compile(src, {
'bare': true
});
}
});
About target React version
This version was build for React v0.14 branch, with babel transformer.