-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathgruntfile.js
More file actions
123 lines (121 loc) · 4.3 KB
/
gruntfile.js
File metadata and controls
123 lines (121 loc) · 4.3 KB
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
module.exports = function (grunt) {
grunt.initConfig({
"eslint-ts": {
default: {
options: {
tsconfig: './lib/tsconfig.json'
}
},
dynamicproto: {
options: {
tsconfig: './lib/tsconfig.json'
}
},
"dynamicproto-fix": {
options: {
tsconfig: './lib/tsconfig.json',
fix: true
}
}
},
ts: {
options: {
comments: true
},
default: {
tsconfig: './lib/tsconfig.json'
},
dynamicproto: {
tsconfig: './lib/tsconfig.json'
},
dynamicprototest: {
tsconfig: './lib/test/tsconfig.json',
src: [
'./lib/test/Selenium/DynamicProtoTests.ts'
],
out: 'lib/test/Selenium/dynamicprototests.js'
},
rollup: {
tsconfig: './rollup/tsconfig.json'
},
rolluptest: {
tsconfig: './rollup/test/tsconfig.json',
src: [
'./rollup/test/Selenium/DynamicProtoRollupTests.ts'
],
out: 'rollup/test/Selenium/dynamicprotorolluptests.js'
}
},
qunit: {
dynamicproto: {
options: {
urls: [
'http://localhost:9005/lib/test/Selenium/Tests.html'
],
timeout: 300 * 1000, // 5 min
console: true,
summaryOnly: false,
httpBase: ".",
puppeteer: {
debug: true,
headless: "new",
timeout: 30000,
ignoreHTTPErrors: true,
args: [
"--enable-precise-memory-info",
"--expose-internals-for-testing",
"--no-sandbox"
]
}
}
},
rollup: {
options: {
urls: [
'http://localhost:9005/rollup/test/Selenium/Tests.html'
],
timeout: 300 * 1000, // 5 min
console: true,
summaryOnly: false,
httpBase: ".",
puppeteer: {
debug: true,
headless: "new",
timeout: 30000,
ignoreHTTPErrors: true,
args: [
"--enable-precise-memory-info",
"--expose-internals-for-testing",
"--no-sandbox"
]
}
}
}
},
connect: {
server: {
options: {
port: 9005,
base: '.',
debug: true
}
}
}
});
grunt.event.on('qunit.testStart', function (name) {
grunt.log.ok('Running test: ' + name);
});
grunt.loadNpmTasks("@nevware21/grunt-ts-plugin");
grunt.loadNpmTasks("@nevware21/grunt-eslint-ts");
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-qunit');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-run');
grunt.registerTask("default", ["ts:rollup", "ts:rolluptest", "ts:dynamicproto", "ts:dynamicprototest", "qunit:rollup", "qunit:dynamicproto"]);
grunt.registerTask("dynamicproto", ["eslint-ts:dynamicproto-fix", "ts:dynamicproto"]);
grunt.registerTask("dynamicprototest", ["ts:dynamicproto", "ts:dynamicprototest", "connect:server", "qunit:dynamicproto"]);
grunt.registerTask("rollup", ["ts:rollup", "ts:rolluptest", "connect:server", "qunit:rollup"]);
grunt.registerTask("lint", ["eslint-ts:dynamicproto"]);
grunt.registerTask("lint-fix", ["eslint-ts:dynamicproto-fix"]);
grunt.registerTask("serve", ["connect:server:keepalive"]);
};