babel-plugin-class-properties-7to6
v0.0.1
Published
es7.classProperties without es6.classes
Downloads
6
Readme
babel-plugin-class-properties-7to6
es7.classProperties without es6.classes.
Note: This plugin doesn't actually transform properties correctly at the moment. Instead, it just removes class properties wherever they're encountered. This obviously breaks the code in the general case, but can still be helpful to apply before some tools (e.g. JSDoc) that rely on pre-ES7 parsers.
The current behavior is enough for my needs. Of course, PRs reimplementing the required bits of es6.classes while still emitting valid ES6 are very welcome.
Installation
$ npm install babel-plugin-class-properties-7to6
Usage
Via .babelrc
(Recommended)
.babelrc
{
"plugins": ["class-properties-7to6"]
}
Via CLI
$ babel --plugins class-properties-7to6 script.js
Via Node API
require('babel').transform('code', {
plugins: ['class-properties-7to6']
});