在 Gulp 数组末尾执行单个通知操作

Perform a single notify action at end of a Gulp array

如何在将数组传递给 src 时执行一次 notify 操作?

 gulp.src('./files/*.swig')
   .pipe(rename({
     suffix: '.html'
   }))
   .pipe(notify('Templates rendered'));

你可以使用onLast方法

 gulp.src('./files/*.swig')
   .pipe(rename({
     suffix: '.html'
   }))
   .pipe(notify({
     onLast: true,
     message: 'Templates rendered' 
   }));