Fix Watch not working

This commit is contained in:
Maurice Grönwoldt 2021-02-18 11:26:45 +01:00
parent fd9a3b3912
commit 3bf4e1ec0a

View file

@ -47,7 +47,7 @@ class JSWorker {
}
startWatch() {
gulp.watch(this.watch, gulp.series(this.taskName))
gulp.watch([this.watch, ...this.files], gulp.parallel([this.taskName]));
}
get taskName() {
@ -62,10 +62,9 @@ class JSWorker {
}
work() {
let d = gulp.src(this.files)
let d = gulp.src(this.files).pipe(concat(this.config.name + '.js'))
if (!this.config.onlyMinify) {
d.pipe(concat(this.config.name + '.js'))
.pipe(gulp.dest(this.path.dir));
d.pipe(gulp.dest(this.path.dir));
}
if (this.config.minify) {
d.pipe(closureCompiler(this.compiler)).pipe(gulp.dest(this.path.dir));