-
Notifications
You must be signed in to change notification settings - Fork 15
/
Gulpfile.js
36 lines (28 loc) · 946 Bytes
/
Gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
'use strict';
var gulp = require('gulp'),
nodemon = require('gulp-nodemon'),
mocha = require('gulp-mocha-co'),
watch = require('gulp-watch');
// Copy all static images
gulp.task('test', function () {
gulp.src('./test/*.js')
.pipe(mocha({
ignoreLeaks: false,
reporter: 'nyan'
}));
});
gulp.task('nodemon', function () {
nodemon({ script: 'app.js', env: { 'NODE_ENV': 'development' }, nodeArgs: ['--debug=9999', '--harmony-generators']})
.on('restart');
});
// Rerun the task when a file changes
gulp.task('watch', function() {
gulp.src(['*.js','routes/*.js', 'models/*.js', 'config/*.js'], { read: true })
.pipe(watch({ emit: 'all' }));
});
// gulp.task('sass-watch', function() {
// gulp.watch('./public/sass/*.scss', ['sass']);
// })
// The default task (called when you run `gulp` from cli)
//gulp.task('default', ['test', 'nodemon', 'watch']);
gulp.task('default', ['nodemon', 'watch']);