Fix Watch not working
This commit is contained in:
parent
fd9a3b3912
commit
3bf4e1ec0a
1 changed files with 3 additions and 4 deletions
|
@ -47,7 +47,7 @@ class JSWorker {
|
||||||
}
|
}
|
||||||
|
|
||||||
startWatch() {
|
startWatch() {
|
||||||
gulp.watch(this.watch, gulp.series(this.taskName))
|
gulp.watch([this.watch, ...this.files], gulp.parallel([this.taskName]));
|
||||||
}
|
}
|
||||||
|
|
||||||
get taskName() {
|
get taskName() {
|
||||||
|
@ -62,10 +62,9 @@ class JSWorker {
|
||||||
}
|
}
|
||||||
|
|
||||||
work() {
|
work() {
|
||||||
let d = gulp.src(this.files)
|
let d = gulp.src(this.files).pipe(concat(this.config.name + '.js'))
|
||||||
if (!this.config.onlyMinify) {
|
if (!this.config.onlyMinify) {
|
||||||
d.pipe(concat(this.config.name + '.js'))
|
d.pipe(gulp.dest(this.path.dir));
|
||||||
.pipe(gulp.dest(this.path.dir));
|
|
||||||
}
|
}
|
||||||
if (this.config.minify) {
|
if (this.config.minify) {
|
||||||
d.pipe(closureCompiler(this.compiler)).pipe(gulp.dest(this.path.dir));
|
d.pipe(closureCompiler(this.compiler)).pipe(gulp.dest(this.path.dir));
|
||||||
|
|
Loading…
Reference in a new issue