forked from bittorrenttorque/btapp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
grunt.js
151 lines (150 loc) · 3.86 KB
/
grunt.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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
"use strict";
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
files: [
'plugin.btapp.js',
'pairing.btapp.js',
'client.btapp.js',
'btapp.js'
],
dependencies: [
'components/jquery/jquery.js',
'components/underscore/underscore.js',
'components/jStorage/jstorage.js',
'components/backbone/backbone.js'
],
meta: {
version: '0.2.0',
banner: '// Btapp.js <%= meta.version %>\n\n' +
'// (c) 2012 Patrick Williams, BitTorrent Inc.\n' +
'// Btapp may be freely distributed under the MIT license.\n' +
'// For all details and documentation:\n' +
'// http://btappjs.com\n'
},
lint: {
files: ['<config:files>','tests/spec/**/*.js']
},
watch: {
files: ['<config:jasmine.specs>','*.js'],
tasks: 'default'
},
jasmine : {
all: ['tests/local/SpecRunner.html']
},
server: {
base: '.',
port: 8888
},
'saucelabs-jasmine': {
all: {
username: 'pwmckenna',
key: '06ba33e4-781f-4f69-b943-f8903ef39fcc',
urls: ['http://127.0.0.1:8888/tests/saucelabs/SpecRunner.html'],
browsers: [
{
// prerun: 'http://torque.bittorrent.com/Torque.msi',
// 'prerun-args': '/q'
browserName: 'chrome',
os: "Windows 2003",
},
{
browserName: 'chrome',
os: "Windows 2008"
},
{
browserName: 'internet explorer',
os: "Windows 2003",
"browser-version": "8"
},
{
browserName: 'internet explorer',
os: "Windows 2008",
"browser-version": "8"
},
{
browserName: 'internet explorer',
os: "Windows 2008",
"browser-version": "9"
},
{
browserName: 'firefox',
os: "Windows 2003"
},
{
browserName: 'firefox',
os: "Windows 2008"
}
],
onTestComplete: function(){
return;
}
}
},
concat: {
dist: {
src: ['<config:files>'],
dest: 'btapp.concat.js'
}
},
min: {
dist: {
src: ['<banner:meta.banner>', '<config:concat.dist.dest>'],
dest: 'btapp.min.js'
}
},
jshint: {
options: {
curly: true,
eqeqeq: true,
immed: true,
latedef: true,
newcap: true,
noarg: true,
sub: true,
undef: true,
boss: true,
eqnull: true,
node: true,
es5: true
},
globals: {
$: false,
document: false,
window: false,
navigator: false,
jasmine : false,
describe : false,
beforeEach : false,
waitsFor: false,
runs: false,
expect : false,
it : false,
spyOn : false,
jQuery: true,
_: true,
Btapp: true,
TorrentClient: true,
LocalTorrentClient: true,
FalconTorrentClient: true,
BtappBase: true,
BtappCollection: true,
BtappModel: true,
PluginManager: true,
PluginManagerView: true,
PluginPairing: true,
JQueryPairing: true,
Pairing: true,
PairingView: true,
Backbone: true,
JSLoad: true,
falcon: true,
ActiveXObject: true
}
}
});
grunt.loadNpmTasks('grunt-saucelabs');
grunt.loadNpmTasks('grunt-jasmine-task');
grunt.registerTask('default', 'lint concat min sauce');
grunt.registerTask('sauce', 'server saucelabs-jasmine')
};