gulp-watch

How to run a task ONLY on modified file with Gulp watch

℡╲_俬逩灬. 提交于 2019-11-27 13:23:41
问题 I have the current gulp task which I use in a gulpfile. Path are from a config.json and everything works perfectly: //Some more code and vars... gulp.task('watch', function() { gulp.watch([config.path.devfolder+"/**/*.png", config.path.devfolder+"/**/*.jpg", config.path.devfolder+"/**/*.gif", config.path.devfolder+"/**/*.jpeg"], ['imagemin-cfg']); }) //Some more code ... gulp.task('imagemin-cfg', function () { return gulp.src([config.path.devfolder+"/**/*.png", config.path.devfolder+"/**/*

Gulp TypeError: Arguments to path.join must be strings

こ雲淡風輕ζ 提交于 2019-11-27 11:18:54
I have i problem with gulp-ruby-sass. When i try to run the watch task and change some .sass files it occurs error: TypeError: Arguments to path.join must be strings Here is my gulpfile.js var gulp = require('gulp'); var jade = require('gulp-jade'); var sass = require('gulp-ruby-sass'); var watch = require('gulp-watch'); gulp.task('sass', function() { return gulp.src('sass/*.sass') .pipe(sass()) .pipe(gulp.dest('./css')); }); gulp.task('watch', function() { gulp.watch('./sass/*.sass', ['sass']); }) I used gulp-slash but it don't works. With the syntax changes in gulp-ruby-sass starting from 1