From c5c685275b24ad0852032124b8ba7e8e9faffb1f Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Sun, 15 Jan 2017 12:19:53 -0500 Subject: [PATCH] add support for the various es6 presets --- index.js | 6 +++++- package.json | 7 ++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index a3c433c..9bb08c7 100644 --- a/index.js +++ b/index.js @@ -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; }); }; diff --git a/package.json b/package.json index 6f93d2f..f71327b 100644 --- a/package.json +++ b/package.json @@ -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" } }