Handle error event generated by jshint fail reporter

Closes #194
master
Rahul Doshi 2014-06-26 21:32:04 +02:00 committed by Sindre Sorhus
parent f4b1aa9e5a
commit de353a0163
1 changed files with 2 additions and 2 deletions

View File

@ -31,10 +31,10 @@ var reload = browserSync.reload;
// Lint JavaScript
gulp.task('jshint', function () {
return gulp.src('app/scripts/**/*.js')
.pipe(reload({stream: true, once: true}))
.pipe($.jshint())
.pipe($.jshint.reporter('jshint-stylish'))
.pipe($.if(!browserSync.active, $.jshint.reporter('fail')))
.pipe(reload({stream: true}));
.pipe($.if(!browserSync.active, $.jshint.reporter('fail')));
});
// Optimize Images