https://github.com/maxhoffmann/node-mercury-jsx
Transparently require() mercury jsx from node.
https://github.com/maxhoffmann/node-mercury-jsx
Last synced: 6 months ago
JSON representation
Transparently require() mercury jsx from node.
- Host: GitHub
- URL: https://github.com/maxhoffmann/node-mercury-jsx
- Owner: maxhoffmann
- Created: 2014-09-18T15:33:02.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-09-18T15:34:01.000Z (over 11 years ago)
- Last Synced: 2025-02-23T22:16:49.400Z (about 1 year ago)
- Language: JavaScript
- Size: 97.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# node-mercury-jsx
Transparently `require()` __mercury__ jsx from node.
## Usage
`require('node-mercury-jsx').install()`
If you want to use a different extension, do:
`require('node-mercury-jsx').install({extension: '.jsx'})`
If you want to couple with an additional transform (such as CoffeeScript), do:
```
var coffee = require('coffee-script');
require('node-mercury-jsx').install({
extension: '.coffee',
additionalTransform: function(src) {
return coffee.compile(src, {
'bare': true
});
}
});
```
If you want to use [ES6 transforms](https://github.com/facebook/jstransform/tree/master/visitors) available in the JSX tool
`require('node-mercury-jsx').install({harmony: true})`