Skip to content

Commit

Permalink
Fail reporters fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Evgeniy Negometyanov committed Nov 11, 2015
1 parent a01f38b commit 561707c
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,23 +41,30 @@ gulp.task('scss:watch', function () {

// #############################################################################
// LINTING
gulp.task('jscs:fix', function () {
return gulp.src(PROJECT_PATH.js + '**/*.js')
.pipe(jscs({fix: true}))
.pipe(gulp.dest(PROJECT_PATH.js));
});

gulp.task('jscs', function () {
return gulp.src(PROJECT_PATTERNS.lint)
.pipe(jscs())
.pipe(jscs.reporter())
.pipe(jscs.reporter('fail'));
});

gulp.task('lint', function () {
return gulp.src(PROJECT_PATTERNS.lint)
.pipe(jshint('.jshintrc'))
.pipe(jshint.reporter(stylish))
.pipe(jscs('.jscsrc'))
.on('error', function (error) {
gutil.log('\n' + error.message);
if (process.env.CI) {
process.exit(1);
}
});
.pipe(jshint.reporter('fail'));
});

gulp.task('lint:watch', function () {
gulp.watch(PROJECT_PATTERNS.lint, ['lint']);
gulp.watch(PROJECT_PATTERNS.lint, ['lint', 'jscs']);
});

gulp.task('compile', ['scss']);
gulp.task('watch', ['scss:watch', 'lint:watch']);
gulp.task('ci', ['lint']);
gulp.task('ci', ['lint', 'jscs']);

0 comments on commit 561707c

Please sign in to comment.