$ npm install babel-plugin-transform-class-properties
.babelrc
{
"plugins": ["transform-class-properties"]
}
$ babel --plugins transform-class-properties script.js
require("babel-core").transform("code", {
plugins: ["transform-class-properties"]
});