-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
94 lines (92 loc) · 1.92 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-shell');
grunt.loadNpmTasks('grunt-nodemon');
grunt.loadNpmTasks('grunt-karma');
grunt.loadNpmTasks('grunt-bower-task');
grunt.loadNpmTasks('grunt-protractor-runner');
grunt.initConfig({
bower: {
install: {
options: {
targetDir: "client/libs"
}
}
},
shell: {
options: {
stdout: true
},
npm_install: {
command: 'npm install'
},
webdriver_update: {
command: './node_modules/.bin/webdriver-manager update'
},
webdriver_start: {
command: './node_modules/.bin/webdriver-manager start'
}
},
nodemon: {
dev: {
script: 'app.js',
options: {
args: ['dev'],
nodeArgs: ['--debug'],
env: {
PORT: '8181'
},
cwd: __dirname + "/server",
watch: ['*.js'],
delayTime: 1,
legacyWatch: true
}
}
},
karma: {
unit: {
configFile: './test/karma-unit.conf.js',
autoWatch: false,
singleRun: true
},
unit_auto: {
configFile: './test/karma-unit.conf.js',
autoWatch: true,
singleRun: false
}
},
protractor: {
options: {
keepAlive: true, // If false, the grunt process stops when the test fails.
noColor: false, // If true, protractor will not use colors in its output.
configFile: "./test/protractor-e2e.conf.js",
},
safari: {
options: {
args: {
browser: "safari"
}
}
},
firefox: {
options: {
args: {
browser: "firefox"
}
}
},
chrome: {
options: {
args: {
browser: "chrome"
}
}
},
}
});
grunt.registerTask('install', ['shell:npm_install', 'bower:install', 'shell:webdriver_update']);
grunt.registerTask('selenium', ['shell:webdriver_start']);
grunt.registerTask('server', ['nodemon:dev']);
grunt.registerTask('unit', ['karma:unit']);
grunt.registerTask('unit_auto', ['karma:unit_auto']);
grunt.registerTask('e2e', ['protractor']);
};