This repository has been archived by the owner on Feb 10, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 125
/
gruntfile.js
80 lines (77 loc) · 1.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
78
79
80
/*global module*/
var pkgData = require('./package.json');
module.exports = function(grunt) {
'use strict';
grunt.initConfig({
pkg: '<json:package.json>',
jshint: {
all: ['./gruntfile.js', './dist/*.js', './test/test.h5validate.js'],
options: {
curly: true,
eqeqeq: true,
immed: true,
latedef: true,
newcap: true,
nonew: true,
noarg: true,
sub: true,
undef: true,
unused: true,
eqnull: true,
node: true,
strict: true,
boss: false
}
},
connect: {
server: {
options: {
port: process.env.sauceport
}
}
},
'saucelabs-qunit': {
all: {
username: process.env.sauceuser,
key: process.env.saucekey,
urls: ['http://127.0.0.1:' +
process.env.sauceport + '/test/index.html'],
tunnelTimeout: ['10000'],
testname: pkgData.name,
tags: [''],
browsers: [
{
browserName: 'chrome'
},
{
browserName: 'internet explorer',
platform: 'Windows 2003',
version: '8'
},
{
browserName: 'internet explorer'
},
{
browserName: 'firefox'
},
{
browserName: 'safari',
platform: 'Mac 10.8',
version: '6'
},
{
browserName: 'internet explorer',
platform: 'Windows 2012',
version: '10'
}
]
}
}
});
console.log(process.env.sauceuser);
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-saucelabs');
grunt.registerTask('default', 'jshint');
grunt.registerTask('test', ['jshint', 'connect:server', 'saucelabs-qunit']);
};