-
-
Notifications
You must be signed in to change notification settings - Fork 1k
/
Copy pathGruntfile.js
111 lines (108 loc) · 3.11 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
module.exports = function (grunt) {
'use strict'
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
usebanner: {
taskName: {
options: {
position: 'top',
banner: '/* \n @package NOTY - Dependency-free notification library \n' +
' @version version: <%= pkg.version %> \n' +
' @contributors https://github.com/needim/noty/graphs/contributors \n' +
' @documentation Examples and Documentation - http://needim.github.com/noty \n' +
' @license Licensed under the MIT licenses: http://www.opensource.org/licenses/mit-license.php \n*/\n',
linebreak: true
},
files: {
src: ['lib/noty.js', 'lib/noty.min.js']
}
}
},
qunit: {
options: {
inject: 'test/unit/phantom.js'
},
files: 'test/index.html'
},
connect: {
server: {
options: {
port: 3000,
base: '.'
}
}
},
'saucelabs-qunit': {
all: {
options: {
testname: 'Noty <%= pkg.version %>',
concurrency: 10,
maxRetries: 3,
maxPollRetries: 4,
urls: ['http://127.0.0.1:3000/test/index.html?hidepassed'],
browsers: [ // https://wiki.saucelabs.com/display/DOCS/Platform+Configurator
{ // macOS
'browserName': 'safari',
'platform': 'OS X 10.11'
},
{
'browserName': 'chrome',
'platform': 'OS X 10.11',
'version': 'latest'
},
{
'browserName': 'firefox',
'platform': 'OS X 10.11',
'version': 'latest'
},
{ // windows
'browserName': 'MicrosoftEdge',
'platform': 'Windows 10',
'version': 'latest'
},
{
'browserName': 'chrome',
'platform': 'Windows 10',
'version': 'latest'
},
{
'browserName': 'firefox',
'platform': 'Windows 10',
'version': 'latest'
},
{
'browserName': 'internet explorer',
'version': '11',
'platform': 'Windows 8.1'
},
{
'browserName': 'internet explorer',
'version': '10',
'platform': 'Windows 8'
},
{ // linux
'browserName': 'chrome',
'platform': 'Linux',
'version': 'latest'
},
{
'browserName': 'firefox',
'platform': 'Linux',
'version': 'latest'
},
{
'browserName': 'opera',
'platform': 'Linux',
'version': 'latest'
}
]
}
}
}
})
require('load-grunt-tasks')(grunt)
grunt.registerTask('banner', 'usebanner')
grunt.registerTask('test', 'qunit')
grunt.registerTask('saucelabs', ['qunit', 'connect', 'saucelabs-qunit'])
grunt.registerTask('default', ['test'])
}