Created
January 15, 2016 20:41
-
-
Save jewer/5a4a964ddbbff76faea9 to your computer and use it in GitHub Desktop.
simplest possible useful gulp file
This file contains hidden or 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'), | |
| util = require('gulp-util'), | |
| jshint = require('gulp-jshint'), | |
| mocha = require('gulp-mocha'); | |
| var srcFiles = './src/**/*.js'; | |
| var testFiles = './test/**/*.js'; | |
| gulp.task('test', function() { | |
| return gulp.src(testFiles, {read: false}) | |
| .pipe(mocha({reporter: 'nyan'})); | |
| }); | |
| gulp.task('jshint', function() { | |
| return gulp.src(srcFiles) | |
| .pipe(jshint()) | |
| .pipe(jshint.reporter('jshint-stylish')); | |
| }); | |
| gulp.task('develop', ['test', 'jshint'], function () { | |
| require('gulp-nodemon')({ | |
| script: 'start.js', | |
| ignore: [ // only watch server files | |
| 'node_modules/*' | |
| ] | |
| }) | |
| .on('restart', ['test', 'jshint']); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment