gulpfile.js 430 B

123456789101112131415161718
  1. var gulp = require('gulp');
  2. var mocha = require('gulp-mocha');
  3. var config = require('./package.json');
  4. var jscs = require('gulp-jscs');
  5. gulp.task('mocha', function() {
  6. return gulp.src('./test/*').
  7. pipe(mocha({ reporter: 'dot' }));
  8. });
  9. gulp.task('jscs', function() {
  10. return gulp.src('./index.js').
  11. pipe(jscs(config.jscsConfig));
  12. });
  13. gulp.task('watch', function() {
  14. gulp.watch('./index.js', ['jscs', 'mocha']);
  15. });