Temp fix for make watch [skip ci] (#4967)
This commit is contained in:
parent
26b4e0909e
commit
f8f78f50e5
28
Gulpfile.js
28
Gulpfile.js
@ -46,8 +46,32 @@ gulp.task("build", function () {
|
|||||||
.pipe(gulp.dest(dest));
|
.pipe(gulp.dest(dest));
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task("watch", ["build"], function (callback) {
|
// TODO: remove this section
|
||||||
|
// temporarily just copying the old code since watch isn't working
|
||||||
|
var dest = "packages";
|
||||||
|
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 (callback) {
|
||||||
watch(scripts, {debounceDelay: 200}, function () {
|
watch(scripts, {debounceDelay: 200}, function () {
|
||||||
gulp.start("build");
|
gulp.start("build-watch");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user