N
N
Nikolay2018-12-24 18:57:14
gulp.js
Nikolay, 2018-12-24 18:57:14

Has the new standard been added to gulpfile.js?

Hello.
Once such a record worked, but now it has stopped working?
gulp.task('watch', function() {
gulp.watch([paths.pug.load[0], paths.pug.load[1]], ['pug:build', reload]);
gulp.watch ([paths.sass.load[0], paths.sass.load[1]], ['sass:build', reload]);
});
How can you optimize so that it works again?
gulp.task('watch', function() {
gulp.watch([paths.pug.load[0],paths.pug.load[1]], gulp.series('pug:build'));
}) ;
That's how it works! But there is no reloading of the web browser (And what new features of series, parallel appeared?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
alex, 2018-12-24
@nikolayogreba

gulp.task('watch', function() {
  gulp.watch([paths.pug.load[0],paths.pug.load[1]], gulp.series(
    'pug:build',
    done => {
      reload();
      done();
    }
  ));
});

And what new features of series, parallel appeared?
this mystery of humanity, which can be solved by reading the documentation

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question