Gulp Watch is not working

后端 未结 3 646
北恋
北恋 2021-02-14 14:28

I\'m new Gulp user, and I try simple script to watch compass, but it didn\'t work. But when I just run gulp compass gulp can compile it. Any ideas? Here my script:<

3条回答
  •  被撕碎了的回忆
    2021-02-14 14:49

    IN GULP 4.X

    You have to pass a function. The customary way of doing this in gulp 4.x is to pass a gulp.series() invocation with only one task name. This returns a function that only executes the specified task.

    gulp.task('watch', function() {
      gulp.watch('./assets/scss/*.scss', gulp.series('compass'))
    });
    

提交回复
热议问题