-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
48 lines (39 loc) · 823 Bytes
/
Gruntfile.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
44
45
46
47
48
module.exports = function(grunt) {
var config = {
}
grunt.loadNpmTasks('grunt-express-server');
grunt.loadNpmTasks('grunt-contrib-watch');
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
watch: {
express: {
files: [
'app/**/*'
, 'js/*.js'
, 'routes/*.js'
],
tasks: [ 'express:dev' ],
options: {
nospawn: true // for grunt-contrib-watch v0.5.0+, "nospawn: true" for lower versions. Without this option specified express won't be reloaded
}
}
},
express: {
options: {
// Override defaults here
},
dev: {
options: {
script: 'dev-start.js'
}
}
}
});
// Default task(s).
grunt.registerTask('default', ['yesman']);
grunt.registerTask('yesman', [
'express:dev',
'watch'
]);
};