-
Notifications
You must be signed in to change notification settings - Fork 9
/
Gruntfile.js
50 lines (47 loc) · 1.04 KB
/
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
49
50
/* jslint node: true */
"use strict";
module.exports = function(grunt) {
grunt.initConfig({
simplemocha: {
options: {
globals: ['should'],
timeout: 3000,
ignoreLeaks: false,
//grep: '*-test',
ui: 'bdd',
reporter: 'tap'
},
all: { src: ['tests/**/*.js'] }
},
env : {
development : {
NODE_ENV : 'development'
},
test : {
NODE_ENV : 'test'
},
production : {
NODE_ENV : 'production'
}
},
forever : {
options : {
index: 'app.js'
}
},
nodemon : {
dev : {
options : {
file : 'app.js'
}
}
}
});
grunt.loadNpmTasks('grunt-env');
grunt.loadNpmTasks('grunt-simple-mocha');
grunt.loadNpmTasks('grunt-nodemon');
grunt.loadNpmTasks('grunt-forever');
grunt.registerTask('test', ['env:test','simplemocha']);
grunt.registerTask('server', ['env:production', 'forever::restart']);
grunt.registerTask('default', ['env:development', 'nodemon']);
};