From 4bf8e4d08da3822e4cf4e93029be181f67be314e Mon Sep 17 00:00:00 2001 From: Henry Zhu Date: Tue, 28 Mar 2017 14:31:55 -0400 Subject: [PATCH] temp fix for watch, still recompiles all [skip ci] --- Gulpfile.js | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-) diff --git a/Gulpfile.js b/Gulpfile.js index ba336b72b9..e4d47c8fea 100644 --- a/Gulpfile.js +++ b/Gulpfile.js @@ -47,31 +47,8 @@ gulp.task("build", function () { .pipe(gulp.dest(dest)); }); -// TODO: remove this section -// temporarily just copying the old code since watch isn't working -gulp.task("build-watch", function () { - return gulp.src(scripts) - .pipe(plumber({ - errorHandler: function (err) { - gutil.log(err.stack); - }, - })) - .pipe(through.obj(function (file, enc, callback) { - file._path = file.path; - file.path = file.path.replace(srcEx, libFragment); - callback(null, file); - })) - .pipe(newer(dest)) - .pipe(through.obj(function (file, enc, callback) { - gutil.log("Compiling", "'" + chalk.cyan(file._path) + "'..."); - callback(null, file); - })) - .pipe(babel()) - .pipe(gulp.dest(dest)); -}); - -gulp.task("watch", ["build-watch"], function () { +gulp.task("watch", ["build"], function () { watch(scripts, { debounceDelay: 200 }, function () { - gulp.start("build-watch"); + gulp.start("build"); }); });