🐶 🍲
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 gulp = require("gulp");
|
||||
const path = require("path");
|
||||
const babelConfig = require("./.babelrc");
|
||||
|
||||
const scripts = "./packages/*/src/**/*.js";
|
||||
|
||||
let srcEx, libFragment;
|
||||
|
||||
if (path.win32 === path) {
|
||||
@ -39,7 +39,7 @@ gulp.task("build", function () {
|
||||
gutil.log("Compiling", "'" + chalk.cyan(file.path) + "'...");
|
||||
callback(null, file);
|
||||
}))
|
||||
.pipe(babel())
|
||||
.pipe(babel(babelConfig))
|
||||
.pipe(through.obj(function (file, enc, callback) {
|
||||
file._path = file.path;
|
||||
file.path = mapToDest(file.path);
|
||||
@ -67,7 +67,7 @@ gulp.task("build-watch", function () {
|
||||
gutil.log("Compiling", "'" + chalk.cyan(file._path) + "'...");
|
||||
callback(null, file);
|
||||
}))
|
||||
.pipe(babel())
|
||||
.pipe(babel(babelConfig))
|
||||
.pipe(gulp.dest(dest));
|
||||
});
|
||||
|
||||
|
||||
37
package.json
37
package.json
@ -10,14 +10,13 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"async": "^1.5.0",
|
||||
"babel-core": "^6.13.2",
|
||||
"babel-core": "7.0.0-alpha.3",
|
||||
"babel-eslint": "^7.0.0",
|
||||
"babel-plugin-istanbul": "^2.0.1",
|
||||
"babel-plugin-transform-class-properties": "^6.6.0",
|
||||
"babel-plugin-transform-flow-strip-types": "^6.3.13",
|
||||
"babel-preset-es2015": "^6.13.2",
|
||||
"babel-preset-stage-0": "^6.0.0",
|
||||
"babel-register": "^6.14.0",
|
||||
"babel-preset-env": "2.0.0-alpha.3",
|
||||
"babel-preset-flow": "7.0.0-alpha.3",
|
||||
"babel-preset-stage-0": "7.0.0-alpha.3",
|
||||
"babel-register": "7.0.0-alpha.4",
|
||||
"browserify": "^13.1.1",
|
||||
"bundle-collapser": "^1.2.1",
|
||||
"chai": "^3.5.0",
|
||||
@ -29,7 +28,7 @@
|
||||
"eslint-plugin-flowtype": "^2.20.0",
|
||||
"flow-bin": "^0.41.0",
|
||||
"gulp": "^3.9.0",
|
||||
"gulp-babel": "^6.0.0",
|
||||
"gulp-babel": "babel/gulp-babel#b7-alpha",
|
||||
"gulp-newer": "^1.0.0",
|
||||
"gulp-plumber": "^1.0.1",
|
||||
"gulp-util": "^3.0.7",
|
||||
@ -49,30 +48,6 @@
|
||||
"node": ">= 4.x <= 7.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": {
|
||||
"all": true,
|
||||
"exclude": [
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
"use strict";
|
||||
|
||||
const babel = require("../package.json").babel;
|
||||
const register = require("babel-register");
|
||||
const babel = require("../.babelrc");
|
||||
const register = require("babel-register").default;
|
||||
const path = require("path");
|
||||
|
||||
if (babel.plugins) {
|
||||
@ -19,7 +19,7 @@ register(babel);
|
||||
register({
|
||||
extensions: [".js"],
|
||||
// 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,
|
||||
compact: true,
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user