https://github.com/epoberezkin/node-babel
Babel require hook with whitelist of transpilers for es6 features that node 0.12 with harmony flag does not support
https://github.com/epoberezkin/node-babel
Last synced: 10 days ago
JSON representation
Babel require hook with whitelist of transpilers for es6 features that node 0.12 with harmony flag does not support
- Host: GitHub
- URL: https://github.com/epoberezkin/node-babel
- Owner: epoberezkin
- License: mit
- Created: 2015-02-26T21:52:06.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2015-03-21T23:29:59.000Z (about 10 years ago)
- Last Synced: 2024-10-18T10:27:58.026Z (6 months ago)
- Language: JavaScript
- Size: 156 KB
- Stars: 11
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# node-babel
Babel require hook with whitelist of transpilers for es6 features that node 0.12 with harmony flag does not support.
Usage:
```
require('node-babel')();
```or
```
require('node-babel')(options);
```[Same options](https://babeljs.io/docs/usage/require/) as in babel are supported but if no options are passed only the following transpilers are whitelisted (so none of es6 features supported with --harmony flag will be transpiled):
- es6.classes
- es6.destructuring
- es6.objectSuper
- es6.parameters.default
- es6.parameters.rest
- es6.properties.computed
- es6.properties.shorthand
- es6.spread
- es6.tailCall
- es7.comprehensions
- es7.exponentiationOperator
- useStrictYou can whitelist additional transpilers by passing options or exclude any of the above by blacklisting them.