-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGruntfile.js
49 lines (46 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
module.exports = function(grunt) {
grunt.initConfig({
auto_install:{
local: {},
back: {
options:{
cwd:'back',
stdout:true,
stderr:true,
failOnError:true
}
}
},
clean:{
back:['back/node_modules']
},
apidoc:{
back:{
src:'back/',
dest:'docs/apirest/'
}
},
execute:{
initDb:{
src:['loadDbScript.js']
},
startServer:{
src:['back/index.js']
}
},
env:{
secEnv:{
SECURITY:'true'
}
}
});
grunt.loadNpmTasks('grunt-auto-install');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-apidoc');
grunt.loadNpmTasks('grunt-execute');
grunt.loadNpmTasks('grunt-env');
grunt.registerTask('docsBack',['clean:back','apidoc:back','auto_install:back']);
grunt.registerTask('backInstall',['clean:back','apidoc:back','auto_install:back','execute:initDb','env:secEnv','execute:startServer']);
grunt.registerTask('initBack',['execute:initDb','env:secEnv','execute:startServer']);
grunt.registerTask('startBack',['env:secEnv','execute:startServer']);
};