postcss / gulp-postcss

Pipe CSS through PostCSS processors with a single parse
MIT License
769 stars 65 forks source link

Fail after error #104

Closed grigorii-horos closed 8 years ago

grigorii-horos commented 8 years ago

It's part of my gulp-config (I use gulp 4):

.pipe(postcss([
  require('precss')(),
  require('postcss-cssnext')()
]).on('error', (err) => {
  gutil.log(err.message)
  done()
}))

This error handler makes gulp-pug-linter to not exit when the error is thrown, but in case of postcss it doesn't work (it's braking the watcher).

[14:54:17] .../css/default.css:5:1: Unknown word

  3 | @import 'partials/main';
  4 | @import 'partials/footer';
> 5 | \\324;\
    | ^
  6 | 

Also when I use gulp-plumber, I obtain a simmilar error:

[14:51:58] Plumber found unhandled error:
 Error in plugin 'gulp-postcss'
Message:
    .../css/default.css:5:1: Unknown word

  3 | @import 'partials/main';
  4 | @import 'partials/footer';
> 5 | \\324;\
    | ^
  6 | 

Details:
    fileName: .../css/default.css