From b9fe28436befb218217ec3bfe15e8495abefa34b Mon Sep 17 00:00:00 2001 From: Lucas Gabriel Lima <lgl15@inf.ufpr.br> Date: Mon, 5 Sep 2016 10:14:20 -0300 Subject: [PATCH] add ignored files to nodemon watch --- gulpfile.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 8f45a9a0..b9b39bbc 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -25,17 +25,15 @@ function compile() { } -gulp.task('default', function() { +gulp.task('default', ['run']); -}); - -gulp.task('test', function(){ +gulp.task('test', () => { gulp.src('test/test.js', {read: false}) .pipe(mocha()) - .once('error', function(){ + .once('error', () => { process.exit(1); }) - .once('end', function(){ + .once('end', () => { process.exit(); }) }); @@ -44,10 +42,11 @@ gulp.task('watch', [], () => { compile(); }); -gulp.task('run', function () { +gulp.task('run', () => { nodemon({ script: 'server.js', tasks: ['watch'], + ignore: ["test/test.js", "gulpfile.js"], ext: 'js html', env: { 'NODE_ENV': 'development' } }) -- GitLab