Created
April 17, 2015 10:11
-
-
Save uesteibar/68aad9527272cd81a2df to your computer and use it in GitHub Desktop.
Basic gulpfile for node.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'); | |
var jshint = require('gulp-jshint'); | |
var nodemon = require('gulp-nodemon'); | |
var mocha = require('gulp-mocha'); | |
var files = require('./gulp.config')(); | |
gulp.task('jshint', function() { | |
gulp.src(files.dev.js) | |
.pipe(jshint()) | |
.pipe(jshint.reporter('default')); | |
}); | |
gulp.task('test', function () { | |
return gulp.src(files.dev.testjs, {read: false}) | |
.pipe(mocha({reporter: 'nyan'})); | |
}); | |
gulp.task('develop', function () { | |
nodemon({ script: 'server.js' | |
, ext: 'js' | |
, tasks: ['jshint', 'test'] }) | |
.on('restart', function () { | |
console.log('restarted!') | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment