-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
51 lines (42 loc) · 1.28 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
'use strict';
var path = require('path');
module.exports = function(grunt) {
grunt.initConfig({
tag_chrome : '--tags @first',
tag_firefox : '',
env : {
chrome : {
PLATFORM : 'CHROME'
},
firefox : {
PLATFORM : 'FIREFOX'
}
},
jshint : {
all : [ 'Gruntfile.js', 'features/step_definitions/*/*.js','features/step_definitions/*.js', 'features/support/*.js' ],
options : {
node : true,
strict : true,
globalstrict : true
}
},
exec : {
run_chrome : {
command : 'node ' + path.join('node_modules', 'cucumber', 'bin', 'cucumber.js -f pretty <%= tag_chrome %>')
},
run_firefox : {
command : 'node ' + path.join('node_modules', 'cucumber', 'bin', 'cucumber.js -f pretty <%= tag_firefox %>')
},
run_help : {
command : 'node ' + path.join('node_modules', 'cucumber', 'bin', 'cucumber.js --help')
},
}
});
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-exec');
grunt.loadNpmTasks('grunt-env');
grunt.registerTask('default', [ 'jshint', 'exec:run_help' ]);
grunt.registerTask('chrome', [ 'env:chrome', 'jshint', 'exec:run_chrome' ]);
grunt.registerTask('firefox', [ 'env:firefox', 'jshint', 'exec:run_firefox' ]);
grunt.registerTask('asdf666', [ 'env:firefox', 'jshint', 'exec:run_firefox' ]);
};