Last active
August 29, 2015 14:21
-
-
Save nelreina/7bdb62acd15d2ecd8a5c to your computer and use it in GitHub Desktop.
Simple server gulpfile with jshint and nodemon
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
/** | |
* Created by nelsonreina on 5/14/15. | |
*/ | |
var gulp = require('gulp'), | |
nodemon = require('gulp-nodemon'), | |
jshint = require('gulp-jshint'); | |
var jsFiles = './public/js/**/*.js'; | |
gulp.task('default', ['jshint', 'nodemon', 'watch']); | |
gulp.task('jshint', function () { | |
return gulp.src(jsFiles) | |
.pipe(jshint()) | |
.pipe(jshint.reporter('default')) | |
}); | |
gulp.task('nodemon', function() { | |
nodemon({ | |
script:'server.js', | |
ext:'js', | |
ignore:['node_modules/*', 'src/*', 'bower_components/*', 'dist/*'], | |
env:{ | |
PORT:8009 | |
} | |
}); | |
}); | |
gulp.task('watch', function () { | |
gulp.watch(jsFiles, ['jshint']); | |
}) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment