gulpfile.js 563 B

1234567891011121314151617181920212223
  1. var
  2. /**
  3. * Dependencies.
  4. */
  5. gulp = require('gulp'),
  6. jscs = require('gulp-jscs'),
  7. jshint = require('gulp-jshint'),
  8. stylish = require('gulp-jscs-stylish');
  9. gulp.task('lint', function () {
  10. var src = ['gulpfile.js', 'index.js', 'lib/**/*.js'];
  11. return gulp.src(src)
  12. .pipe(jshint('.jshintrc')) // Enforce good practics.
  13. .pipe(jscs('.jscsrc')) // Enforce style guide.
  14. .pipe(stylish.combineWithHintResults())
  15. .pipe(jshint.reporter('jshint-stylish', {verbose: true}))
  16. .pipe(jshint.reporter('fail'));
  17. });
  18. gulp.task('default', gulp.task('lint'));