Skip to content

Instantly share code, notes, and snippets.

@austinpray
Last active August 29, 2015 14:15
Show Gist options
  • Save austinpray/bbc4886ef950d6abd1e9 to your computer and use it in GitHub Desktop.
Save austinpray/bbc4886ef950d6abd1e9 to your computer and use it in GitHub Desktop.
Reduced testcase for gulp-less breaking on a watch with plumber
node_modules/
dist

Reduced Testcase for gulp-less breaking on watch with gulp-plumber

Expected behavior:

As a user running gulp watch

  1. save file with error
  2. error prints to console
  3. save file again with error removed
  4. less compiles

Behavior I am getting:

  1. save file with error
  2. error prints to console
  3. save file again with error removed
  4. nothing happens
var gulp = require('gulp');
var less = require('gulp-less');
var plumber = require('gulp-plumber');
gulp.task('styles', function () {
return gulp.src('main.less')
.pipe(plumber())
.pipe(less())
.on('error', console.error.bind(console))
.pipe(gulp.dest('./dist'));
});
gulp.task('watch', function () {
gulp.watch('main.less', ['styles']);
});
body {
background-color: blue;
}
tesgs
{
"name": "gulp-less-watch-testcase",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "[email protected]:/dd63f2f79e23cf3317e7.git"
},
"author": "",
"license": "ISC",
"devDependencies": {
"gulp": "3.8.11",
"gulp-less": "3.0.1",
"gulp-plumber": "0.6.6"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment