Skip to content

Commit

Permalink
Update gulpfile by plugin boilerplate
Browse files Browse the repository at this point in the history
  • Loading branch information
ai committed Aug 23, 2015
1 parent 009491c commit df0211e
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
var gulp = require('gulp');

var files = ['index.js', 'test/*.js', 'gulpfile.js'];

gulp.task('lint', function () {
var eslint = require('gulp-eslint');
return gulp.src(['index.js', 'test/*.js', 'gulpfile.js'])
return gulp.src(files)
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.failAfterError());
});

gulp.task('test', function () {
var mocha = require('gulp-mocha');
return gulp.src('test/*.js', { read: false }).pipe(mocha());
return gulp.src('test/*.js', { read: false })
.pipe(mocha());
});

gulp.task('default', ['lint', 'test']);

gulp.task('watch', function () {
gulp.watch(files, ['lint', 'test']);
});

0 comments on commit df0211e

Please sign in to comment.