forked from johnpapa/hottowel-angular-typescript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
small.gulpfile.js
43 lines (38 loc) · 974 Bytes
/
small.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
37
38
39
40
41
42
43
/// <reference path="src/server/tsd-server.d.ts"/>
var gulp = require('gulp');
var $ = require('gulp-load-plugins')({ lazy: true });
/**
* serve the dev environment
* --debug-brk or --debug
* --nosync
*/
gulp.task('serve-dev', function () {
log(process.argv);
var nodeOptions = {
script: './src/server/app.js',
delayTime: 1,
env: {
'PORT': 8001,
'NODE_ENV': 'dev'
},
watch: ['./src/server/'],
nodeArgs: ['--debug=5858']
};
return $.nodemon(nodeOptions);
});
/**
* Log a message or series of messages using chalk's blue color.
* Can pass in a string, object or array.
*/
function log(msg) {
if (typeof(msg) === 'object') {
for (var item in msg) {
if (msg.hasOwnProperty(item)) {
$.util.log($.util.colors.blue(msg[item]));
}
}
} else {
$.util.log($.util.colors.blue(msg));
}
}
module.exports = gulp;