Skip to content

Instantly share code, notes, and snippets.

@kevinohara80
Last active August 29, 2015 13:57
Show Gist options
  • Save kevinohara80/9898305 to your computer and use it in GitHub Desktop.
Save kevinohara80/9898305 to your computer and use it in GitHub Desktop.
gulpfile.js
var gulp = require('gulp');
var jshint = require('gulp-jshint');
var stylish = require('jshint-stylish');
var mocha = require('gulp-mocha');
gulp.task('lint', function(){
return gulp.src(['./*.js', './lib/**/*.js', './models/**/*.js', './routes/**/*.js'])
.pipe(jshint('.jshintrc'))
.pipe(jshint.reporter('jshint-stylish'));
});
gulp.task('mocha', function(){
return gulp.src(['./test/*.js'])
.pipe(mocha({
reporter: 'spec',
globals: {
should: require('should')
}
}));
});
gulp.task('test', ['lint', 'mocha']);
gulp.task('default', ['test']);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment