Upgrade to gulp@4 (#7811)

This commit is contained in:
Brian Ng 2018-04-25 14:01:35 -05:00 committed by Henry Zhu
parent 408124438a
commit 0112479ba9
3 changed files with 608 additions and 250 deletions

View File

@ -5,7 +5,7 @@ const through = require("through2");
const chalk = require("chalk");
const newer = require("gulp-newer");
const babel = require("gulp-babel");
const watch = require("gulp-watch");
const gulpWatch = require("gulp-watch");
const gutil = require("gulp-util");
const filter = require("gulp-filter");
const gulp = require("gulp");
@ -114,21 +114,26 @@ function buildRollup(packages) {
);
}
gulp.task("default", ["build"]);
gulp.task("build", function() {
const bundles = ["packages/babylon"];
return merge([buildBabel(/* exclude */ bundles), buildRollup(bundles)]);
});
gulp.task("default", gulp.series("build"));
gulp.task("build-no-bundle", () => buildBabel());
gulp.task("watch", ["build-no-bundle"], function() {
watch(sources.map(getGlobFromSource), { debounceDelay: 200 }, function() {
gulp.start("build-no-bundle");
});
});
gulp.task(
"watch",
gulp.series("build-no-bundle", function watch() {
gulpWatch(
sources.map(getGlobFromSource),
{ debounceDelay: 200 },
gulp.task("build-no-bundle")
);
})
);
registerStandalonePackageTask(
gulp,

View File

@ -35,7 +35,7 @@
"eslint-plugin-prettier": "^2.5.0",
"flow-bin": "^0.66.0",
"graceful-fs": "^4.1.11",
"gulp": "^3.9.0",
"gulp": "^4.0.0",
"gulp-babel": "^8.0.0-beta.2",
"gulp-filter": "^5.1.0",
"gulp-newer": "^1.0.0",
@ -43,7 +43,7 @@
"gulp-rename": "^1.2.2",
"gulp-uglify": "^3.0.0",
"gulp-util": "^3.0.7",
"gulp-watch": "^4.3.5",
"gulp-watch": "^5.0.0",
"husky": "^0.14.3",
"jest": "^22.4.2",
"lerna": "2.0.0",

833
yarn.lock

File diff suppressed because it is too large Load Diff