-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
49 lines (39 loc) · 1 KB
/
gulpfile.js
File metadata and controls
49 lines (39 loc) · 1 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
/**
* Created by fiddlest on 02/12/15.
*/
'use strict';
var gulp = require('gulp');
var jshint = require('gulp-jshint');
var nodemon = require('gulp-nodemon');
gulp.task('default',['lint','nodemon']);
gulp.task('lint', function() {
return gulp.src('./app/**/*.js')
.pipe(jshint())
.pipe(jshint.reporter('default'));
});
gulp.task('nodemon', function (cb) {
var started = false;
return nodemon({
script: './app.js'
}).on('start', function () {
// to avoid nodemon being started multiple times
// thanks @matthisk
if (!started) {
cb();
started = true;
}
});
});
gulp.task('passwordService', function (cb) {
var started = false;
return nodemon({
script: './app/services/passwordService.js'
}).on('start', function () {
// to avoid nodemon being started multiple times
// thanks @matthisk
if (!started) {
cb();
started = true;
}
});
});