kriasoft / static-site-starter

Static Website Starter Kit (static site generator) powered by Gulp, Jade, Bootstrap, LESS and BrowserSync. It can automatically deploy your website to GitHub Pages via Travis CI.
Apache License 2.0
135 stars 58 forks source link

Catch gulp plugins errors #13

Open Bogdaan opened 8 years ago

Bogdaan commented 8 years ago

While i use gulp watch (with browsersync) and make a mistake in jade template - this will break watch cycle. So you have to restart gulp.

Posible solution:

1) for less:

.pipe($.less().on('error', console.log))

2) for jade:

.pipe(
      $.if(/\.jade$/, $.jade({
        pretty: !RELEASE,
        locals: {
          pkgs: pkgs,
          googleAnalyticsID: GOOGLE_ANALYTICS_ID
        }
      }).on('error', console.log)
    ))

Same question: https://github.com/gulpjs/gulp/issues/71