* use .babelrc.js, compile bundled/non-bundled with loose mode

* add back helper, exclude typeof transform
This commit is contained in:
Henry Zhu 2017-09-17 02:40:48 -04:00 committed by Johann-S
parent 5cec8e0de6
commit f17b165f0f
5 changed files with 1633 additions and 630 deletions

View File

@ -1,12 +0,0 @@
{
"presets": [
[
"es2015",
{
"loose": true,
"modules": false
}
]
],
"plugins": ["external-helpers"]
}

16
.babelrc.js Normal file
View File

@ -0,0 +1,16 @@
module.exports = {
presets: [
[
'env',
{
loose: true,
modules: false,
exclude: ['transform-es2015-typeof-symbol']
}
]
],
plugins: [
process.env.ROLLUP && 'external-helpers',
process.env.PLUGINS && 'transform-es2015-modules-strip',
].filter(Boolean)
};

View File

@ -11,11 +11,9 @@ const plugins = [
babel({
exclude: 'node_modules/**', // only transpile our source code
externalHelpersWhitelist: [ // include only required helpers
'typeof',
'classCallCheck',
'defineProperties',
'createClass',
'inherits',
'possibleConstructorReturn'
'inheritsLoose'
]
})
]

2215
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -33,9 +33,9 @@
"js-lint": "eslint js/ && eslint --config js/tests/.eslintrc.json --env node build/ Gruntfile.js",
"js-lint-docs": "eslint --config js/tests/.eslintrc.json assets/js/ sw.js",
"js-compile": "npm-run-all --parallel js-compile-*",
"js-compile-standalone": "rollup --environment BUNDLE:false --config build/rollup.config.js",
"js-compile-bundle": "rollup --environment BUNDLE:true --config build/rollup.config.js",
"js-compile-plugins": "babel --no-babelrc js/src/ --out-dir js/dist/ --source-maps --presets=es2015 --plugins=transform-es2015-modules-strip",
"js-compile-standalone": "ROLLUP=true rollup --environment BUNDLE:false --config build/rollup.config.js",
"js-compile-bundle": "ROLLUP=true rollup --environment BUNDLE:true --config build/rollup.config.js",
"js-compile-plugins": "PLUGINS=true babel js/src/ --out-dir js/dist/ --source-maps",
"js-minify": "npm-run-all --parallel js-minify-standalone js-minify-bundle",
"js-minify-standalone": "uglifyjs --config-file build/uglifyjs.config.json --output dist/js/bootstrap.min.js dist/js/bootstrap.js",
"js-minify-bundle": "uglifyjs --config-file build/uglifyjs.config.json --output dist/js/bootstrap.bundle.min.js dist/js/bootstrap.bundle.js",
@ -76,11 +76,11 @@
},
"devDependencies": {
"autoprefixer": "^7.1.2",
"babel-cli": "^6.24.1",
"babel-cli": "7.0.0-beta.0",
"babel-eslint": "^8.0.0",
"babel-plugin-external-helpers": "^6.22.0",
"babel-plugin-external-helpers": "7.0.0-beta.0",
"babel-plugin-transform-es2015-modules-strip": "^0.1.1",
"babel-preset-es2015": "^6.24.1",
"babel-preset-env": "2.0.0-beta.0",
"clean-css-cli": "^4.1.6",
"eslint": "^4.2.0",
"grunt": "^1.0.1",
@ -95,7 +95,7 @@
"postcss-cli": "^4.1.0",
"qunit-phantomjs-runner": "^2.3.0",
"qunitjs": "^2.4.0",
"rollup": "^0.49.2",
"rollup": "^0.50.0",
"rollup-plugin-babel": "^3.0.2",
"rollup-plugin-node-resolve": "^3.0.0",
"shelljs": "^0.7.8",