Skip to content

Commit

Permalink
Upgrade to gulp@4 (#7811)
Browse files Browse the repository at this point in the history
  • Loading branch information
existentialism authored and hzoo committed Apr 25, 2018
1 parent 4081244 commit 0112479
Show file tree
Hide file tree
Showing 3 changed files with 609 additions and 251 deletions.
21 changes: 13 additions & 8 deletions Gulpfile.js
Expand Up @@ -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");
Expand Down Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -35,15 +35,15 @@
"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",
"gulp-plumber": "^1.0.1",
"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",
Expand Down

0 comments on commit 0112479

Please sign in to comment.