0
如何根據吞嚥是否在觀察來應用條件參數?如果吞嚥正在看有條件的
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'));
}
});
感謝thataustin!這工作。 – 2014-12-05 12:04:13