Is it possible to ignore files in jshint when running gulp --production?

I just did this myself by manually adding an excluded file in gulpfile.js here: https://github.com/roots/sage/blob/93da15b03d44e2122699c285a75e4a9a113ea17b/gulpfile.js#L227-L234

Example:

gulp.task('jshint', function() {
  return gulp.src([
    'bower.json', 'gulpfile.js'
  ].concat(project.js)
  .concat('!assets/scripts/plugins/**'))
    .pipe($.jshint())
    .pipe($.jshint.reporter('jshint-stylish'))
    .pipe($.jshint.reporter('fail'));
});

! means exclude.

9 Likes