diff --git a/gulpfile.js b/gulpfile.js index 8f45a9a0d72f1e98e005a59b76ab656d1df294b5..b9b39bbc5a6ef6a601b1fb43a1a9331082023e45 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' } })