如何根据 gulp 是否正在观看来应用条件参数?
gulp.task('styles', function(){
return gulp.src('sass/**/*.scss')
.pipe(sass())
if (isWatching) {
// gulp.dest to the .tmp directory if "gulp watch"
.pipe(gulp.dest('.tmp/css/'));
} else {
// gulp.dest to the distribution directory if "gulp" (or anything else)
.pipe(gulp.dest('dist'));
}
});