node-babel
Babel require hook with whitelist of transpilers for es6 features that node 0.12 with harmony flag does not support
Last updated 5 years ago by esp .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install node-babel 
SYNC missed versions from official npm registry.

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 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
  • useStrict

You can whitelist additional transpilers by passing options or exclude any of the above by blacklisting them.

Current Tags

  • 0.1.2                                ...           latest (5 years ago)

2 Versions

  • 0.1.2                                ...           5 years ago
  • 0.1.1                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 3
Last Day 0
Last Week 3
Last Month 13
Dependencies (2)
Dev Dependencies (0)
None

Copyright 2014 - 2017 © taobao.org |