add support for the various es6 presets

This commit is contained in:
Iuri Matias 2017-01-15 12:19:53 -05:00
parent e94ae7555b
commit c5c685275b
2 changed files with 11 additions and 2 deletions

View File

@ -1,4 +1,8 @@
var babel = require("babel-core");
require("babel-preset-react");
require("babel-preset-es2015");
require("babel-preset-es2016");
require("babel-preset-es2017");
module.exports = function(embark) {
@ -10,7 +14,7 @@ module.exports = function(embark) {
return source;
}
return babel.transform(source, {}).code;
return babel.transform(source, {minified: true, presets: ['es2015', 'es2016', 'es2017', 'react']}).code;
});
};

View File

@ -9,6 +9,11 @@
"author": "",
"license": "ISC",
"dependencies": {
"babel-core": "^6.18.2"
"babel-cli": "^6.18.0",
"babel-core": "^6.18.2",
"babel-preset-es2015": "^6.18.0",
"babel-preset-es2016": "^6.16.0",
"babel-preset-es2017": "^6.16.0",
"babel-preset-react": "^6.16.0"
}
}