🐶 🍲
This commit is contained in:
parent
7a1ccf076c
commit
4278ede41f
21
.babelrc.js
Normal file
21
.babelrc.js
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
module.exports = {
|
||||||
|
"comments": false,
|
||||||
|
"presets": [
|
||||||
|
[
|
||||||
|
"env",
|
||||||
|
{
|
||||||
|
"loose": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stage-0",
|
||||||
|
"flow"
|
||||||
|
],
|
||||||
|
"env": {
|
||||||
|
"cov": {
|
||||||
|
"auxiliaryCommentBefore": "istanbul ignore next",
|
||||||
|
"plugins": [
|
||||||
|
"istanbul"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
@ -9,9 +9,9 @@ const watch = require("gulp-watch");
|
|||||||
const gutil = require("gulp-util");
|
const gutil = require("gulp-util");
|
||||||
const gulp = require("gulp");
|
const gulp = require("gulp");
|
||||||
const path = require("path");
|
const path = require("path");
|
||||||
|
const babelConfig = require("./.babelrc");
|
||||||
|
|
||||||
const scripts = "./packages/*/src/**/*.js";
|
const scripts = "./packages/*/src/**/*.js";
|
||||||
|
|
||||||
let srcEx, libFragment;
|
let srcEx, libFragment;
|
||||||
|
|
||||||
if (path.win32 === path) {
|
if (path.win32 === path) {
|
||||||
@ -39,7 +39,7 @@ gulp.task("build", function () {
|
|||||||
gutil.log("Compiling", "'" + chalk.cyan(file.path) + "'...");
|
gutil.log("Compiling", "'" + chalk.cyan(file.path) + "'...");
|
||||||
callback(null, file);
|
callback(null, file);
|
||||||
}))
|
}))
|
||||||
.pipe(babel())
|
.pipe(babel(babelConfig))
|
||||||
.pipe(through.obj(function (file, enc, callback) {
|
.pipe(through.obj(function (file, enc, callback) {
|
||||||
file._path = file.path;
|
file._path = file.path;
|
||||||
file.path = mapToDest(file.path);
|
file.path = mapToDest(file.path);
|
||||||
@ -67,7 +67,7 @@ gulp.task("build-watch", function () {
|
|||||||
gutil.log("Compiling", "'" + chalk.cyan(file._path) + "'...");
|
gutil.log("Compiling", "'" + chalk.cyan(file._path) + "'...");
|
||||||
callback(null, file);
|
callback(null, file);
|
||||||
}))
|
}))
|
||||||
.pipe(babel())
|
.pipe(babel(babelConfig))
|
||||||
.pipe(gulp.dest(dest));
|
.pipe(gulp.dest(dest));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
37
package.json
37
package.json
@ -10,14 +10,13 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"async": "^1.5.0",
|
"async": "^1.5.0",
|
||||||
"babel-core": "^6.13.2",
|
"babel-core": "7.0.0-alpha.3",
|
||||||
"babel-eslint": "^7.0.0",
|
"babel-eslint": "^7.0.0",
|
||||||
"babel-plugin-istanbul": "^2.0.1",
|
"babel-plugin-istanbul": "^2.0.1",
|
||||||
"babel-plugin-transform-class-properties": "^6.6.0",
|
"babel-preset-env": "2.0.0-alpha.3",
|
||||||
"babel-plugin-transform-flow-strip-types": "^6.3.13",
|
"babel-preset-flow": "7.0.0-alpha.3",
|
||||||
"babel-preset-es2015": "^6.13.2",
|
"babel-preset-stage-0": "7.0.0-alpha.3",
|
||||||
"babel-preset-stage-0": "^6.0.0",
|
"babel-register": "7.0.0-alpha.4",
|
||||||
"babel-register": "^6.14.0",
|
|
||||||
"browserify": "^13.1.1",
|
"browserify": "^13.1.1",
|
||||||
"bundle-collapser": "^1.2.1",
|
"bundle-collapser": "^1.2.1",
|
||||||
"chai": "^3.5.0",
|
"chai": "^3.5.0",
|
||||||
@ -29,7 +28,7 @@
|
|||||||
"eslint-plugin-flowtype": "^2.20.0",
|
"eslint-plugin-flowtype": "^2.20.0",
|
||||||
"flow-bin": "^0.41.0",
|
"flow-bin": "^0.41.0",
|
||||||
"gulp": "^3.9.0",
|
"gulp": "^3.9.0",
|
||||||
"gulp-babel": "^6.0.0",
|
"gulp-babel": "babel/gulp-babel#b7-alpha",
|
||||||
"gulp-newer": "^1.0.0",
|
"gulp-newer": "^1.0.0",
|
||||||
"gulp-plumber": "^1.0.1",
|
"gulp-plumber": "^1.0.1",
|
||||||
"gulp-util": "^3.0.7",
|
"gulp-util": "^3.0.7",
|
||||||
@ -49,30 +48,6 @@
|
|||||||
"node": ">= 4.x <= 7.x",
|
"node": ">= 4.x <= 7.x",
|
||||||
"npm": "2.x || 3.x || 4.x"
|
"npm": "2.x || 3.x || 4.x"
|
||||||
},
|
},
|
||||||
"babel": {
|
|
||||||
"comments": false,
|
|
||||||
"presets": [
|
|
||||||
[
|
|
||||||
"es2015",
|
|
||||||
{
|
|
||||||
"loose": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"stage-0"
|
|
||||||
],
|
|
||||||
"plugins": [
|
|
||||||
"transform-class-properties",
|
|
||||||
"transform-flow-strip-types"
|
|
||||||
],
|
|
||||||
"env": {
|
|
||||||
"cov": {
|
|
||||||
"auxiliaryCommentBefore": "istanbul ignore next",
|
|
||||||
"plugins": [
|
|
||||||
"istanbul"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nyc": {
|
"nyc": {
|
||||||
"all": true,
|
"all": true,
|
||||||
"exclude": [
|
"exclude": [
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const babel = require("../package.json").babel;
|
const babel = require("../.babelrc");
|
||||||
const register = require("babel-register");
|
const register = require("babel-register").default;
|
||||||
const path = require("path");
|
const path = require("path");
|
||||||
|
|
||||||
if (babel.plugins) {
|
if (babel.plugins) {
|
||||||
@ -19,7 +19,7 @@ register(babel);
|
|||||||
register({
|
register({
|
||||||
extensions: [".js"],
|
extensions: [".js"],
|
||||||
// Only js files in the test folder but not in the subfolder fixtures.
|
// Only js files in the test folder but not in the subfolder fixtures.
|
||||||
only: /packages\/.+\/test\/(?!fixtures\/).+\.js$/,
|
only: [/packages\/.+\/test\/(?!fixtures\/).+\.js$/],
|
||||||
babelrc: false,
|
babelrc: false,
|
||||||
compact: true,
|
compact: true,
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user