use node current in dev
This commit is contained in:
parent
4278ede41f
commit
18bbaa0253
34
.babelrc.js
34
.babelrc.js
@ -1,21 +1,29 @@
|
||||
"use strict";
|
||||
|
||||
let envOpts = {
|
||||
loose: true
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
"comments": false,
|
||||
"presets": [
|
||||
comments: false,
|
||||
presets: [
|
||||
[
|
||||
"env",
|
||||
{
|
||||
"loose": true
|
||||
}
|
||||
"env", envOpts
|
||||
],
|
||||
"stage-0",
|
||||
"flow"
|
||||
"flow",
|
||||
],
|
||||
"env": {
|
||||
"cov": {
|
||||
"auxiliaryCommentBefore": "istanbul ignore next",
|
||||
"plugins": [
|
||||
"istanbul"
|
||||
]
|
||||
env: {
|
||||
cov: {
|
||||
auxiliaryCommentBefore: "istanbul ignore next",
|
||||
plugins: ["istanbul"]
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
if (process.env.BABEL_ENV === 'development') {
|
||||
envOpts.targets = {
|
||||
node: "current"
|
||||
};
|
||||
envOpts.debug = true;
|
||||
};
|
||||
|
||||
6
Makefile
6
Makefile
@ -16,16 +16,16 @@ build-dist: build
|
||||
|
||||
watch: clean
|
||||
rm -rf packages/*/lib
|
||||
./node_modules/.bin/gulp watch
|
||||
BABEL_ENV=development ./node_modules/.bin/gulp watch
|
||||
|
||||
lint:
|
||||
./node_modules/.bin/eslint scripts packages Gulpfile.js --format=codeframe
|
||||
./node_modules/.bin/eslint scripts packages *.js --format=codeframe
|
||||
|
||||
flow:
|
||||
./node_modules/.bin/flow check
|
||||
|
||||
fix:
|
||||
./node_modules/.bin/eslint scripts packages Gulpfile.js --format=codeframe --fix
|
||||
./node_modules/.bin/eslint scripts packages *.js --format=codeframe --fix
|
||||
|
||||
clean: test-clean
|
||||
rm -rf packages/babel-polyfill/browser*
|
||||
|
||||
@ -2,18 +2,6 @@
|
||||
|
||||
const babel = require("../.babelrc");
|
||||
const register = require("babel-register").default;
|
||||
const path = require("path");
|
||||
|
||||
if (babel.plugins) {
|
||||
// correct path of relative plugins
|
||||
babel.plugins = babel.plugins.map(function (plugin) {
|
||||
if (plugin.charAt(0) === ".") {
|
||||
return plugin.replace(/^\./, path.join(__dirname, ".."));
|
||||
}
|
||||
|
||||
return plugin;
|
||||
});
|
||||
}
|
||||
|
||||
register(babel);
|
||||
register({
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user