-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgruntfile.js
77 lines (66 loc) · 2.87 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
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
karma: {
options: {
configFile: 'config/karma.conf.js',
thresholdReporter: {
statements: 90,
branches: 60,
functions: 85,
lines: 90
},
},
unit: {
coverageReporter: {type: 'html', dir:'../coverage/'}
},
continuous: {
singleRun: true,
browsers: ['PhantomJS'],
coverageReporter: {type: 'lcov', dir:'../coverage/'},
}
},
protractor: {
options: { configFile: "node_modules/protractor/referenceConf.js" },
local: { options: {configFile: "config/protractor.config.js" } },
ci: { options: { configFile: "config/protractor.config.ci.js" }},
cucumber: { options: { configFile: "config/protractor.config.cucumber.js" }}
},
jslint: {
client : {
src: ['src/app/**/*.js','userJourneys/**/*.js','spec/**/*.js'],
directives: {
browser: true,
predef: ['jQuery', 'angular','describe','it','browser','expect','element','by']
},
options: {}
}
},
shell: {
updateLocalWebdriver: { command: './node_modules/protractor/bin/webdriver-manager update' },
updateCiWebdriver: { command: './node_modules/grunt-protractor-runner/node_modules/protractor/bin/webdriver-manager update' },
startJekyll: { command: 'jekyll serve --watch' },
updatepackages: { command: 'npm-check-updates -u' },
},
coveralls: {
src: 'coverage/**/lcov.info',
options: { force: false }
},
});
grunt.loadNpmTasks('grunt-karma');
grunt.loadNpmTasks('grunt-shell');
grunt.loadNpmTasks('grunt-jslint');
grunt.loadNpmTasks('grunt-protractor-runner');
grunt.loadNpmTasks('grunt-coveralls');
grunt.registerTask('lint', ['jslint']);
grunt.registerTask('start.server', ['shell:startJekyll']);
grunt.registerTask('acceptance', ['shell:updateLocalWebdriver', 'protractor:local']);
grunt.registerTask('acceptance-ci', ['protractor:ci']);
grunt.registerTask('acceptance-cucumber', ['protractor:cucumber']);
grunt.registerTask('all', ['jslint', 'karma:continuous', 'shell:updateLocalWebdriver', 'protractor:local']);
grunt.registerTask('unit', ['karma:unit']);
grunt.registerTask('continuous', ['karma:continuous']);
grunt.registerTask('submit.coverage', ['coveralls']);
grunt.registerTask('update.packages', ['shell:updatepackages']);
grunt.registerTask('default', ['']);
};