-
Notifications
You must be signed in to change notification settings - Fork 9
/
Gruntfile.js
87 lines (76 loc) · 1.48 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
/*
* grunt-protractor-webdriver
* https://github.com/seckardt/grunt-protractor-webdriver
*
* Copyright (c) 2014 Steffen Eckardt
* Licensed under the MIT license.
*/
'use strict';
module.exports = function (grunt) {
grunt.loadTasks('tasks');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-protractor-runner');
grunt.loadNpmTasks('grunt-express');
grunt.loadNpmTasks('grunt-shell');
var path = require('path');
// Project configuration.
grunt.initConfig({
jshint: {
options: {
jshintrc: '.jshintrc'
},
all: [
'Gruntfile.js',
'tasks/*.js'
]
},
express: {
server: {
options: {
port: 9999,
hostname: 'localhost',
server: 'server'
}
}
},
protractor_webdriver: {
alive: {
options: {
keepAlive: true
}
},
dead: {}
},
protractor: {
options: {
configFile: 'protractor.conf.js',
keepAlive: false
},
target1: {},
target2: {}
},
shell: {
protractor: {
options: {
stdout: true
},
command: path.resolve('node_modules/protractor/bin/webdriver-manager') + ' update --standalone --chrome'
}
}
});
grunt.registerTask('test', [
'default',
'express:server',
'shell:protractor',
'protractor_webdriver:alive',
'protractor:target1',
'protractor:target2',
'protractor_webdriver:dead',
'protractor:target1'
]);
grunt.registerTask('server', [
'express:server',
'express-keepalive'
]);
grunt.registerTask('default', ['jshint']);
};