-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGruntfile.js
49 lines (42 loc) · 1.06 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
/**
Lint files
*/
//get configs
//regular config
var configFile ='./config.json';
var cfgJson =require(configFile);
//test config
var configTestFile ='./config.test.json';
var cfgTestJson =require(configTestFile);
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
cfgJson: cfgJson,
cfgTestJson: cfgTestJson,
jshint: {
options:{
force: true
//globalstrict: true
//sub:true,
},
all: ['Gruntfile.js', 'tasks/**/*.js', 'test/**/*.js']
},
foreverMulti: {
appServer: {
action: 'restart',
file: 'test/run.js',
options: ["-m '"+cfgJson.app.name+" port "+cfgJson.server.port+"'"]
},
testServer: {
// action: 'restart', //default is restart if none specified
file: 'test/run.js',
options: ["config=test", "-m '"+cfgTestJson.app.name+" port "+cfgTestJson.server.port+"'"]
}
}
});
// Load plugins
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadTasks('tasks'); //load our forever-multi plugin
// Default task(s).
grunt.registerTask('default', ['jshint', 'foreverMulti']);
};