stephenlacy / gulp-stylus

Stylus plugin for gulp
MIT License
223 stars 60 forks source link

how to deal with the expection when i use watch #188

Closed zentoLu closed 7 years ago

zentoLu commented 7 years ago

don't want to stop watch , but gulp-stylus won't makes an error unless i save when all of the styl files are correct without syntax error

stephenlacy commented 7 years ago

You did not add any code, gulpfile, source files, node version, npm version, gulp version, gulp-stylus version - how do you think I can help you? https://github.com/floatdrop/gulp-plumber

zentoLu commented 7 years ago

thank u for your answer , but i find the answer by google finally, solved this problem by listen to the error event gulp.task('stylus', function(){ return gulp.src(config.baseCss + config.css.src) .pipe(sourcemaps.init()) .pipe(stylus({ compress: true }).on('error', function(e) { console.log('stylus error',e); })) .pipe(sourcemaps.write()) .pipe(gulp.dest(config.baseCss)); });