forked from theintern/intern
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclient.js
40 lines (38 loc) · 964 Bytes
/
client.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
/* jshint node:true, es3:false */
if (typeof process !== 'undefined' && typeof define === 'undefined') {
(function () {
require('dojo/loader')((this.__internConfig = {
baseUrl: process.cwd().replace(/\\/g, '/'),
packages: [
{ name: 'intern', location: __dirname.replace(/\\/g, '/') }
],
map: {
intern: {
dojo: 'intern/browser_modules/dojo',
chai: 'intern/browser_modules/chai/chai',
diff: 'intern/browser_modules/diff/diff'
},
'*': {
'intern/dojo': 'intern/browser_modules/dojo'
}
}
}), [ 'intern/client' ]);
})();
}
else {
define([
'./lib/executors/PreExecutor',
'dojo/has!host-node?./lib/exitHandler'
], function (PreExecutor, exitHandler) {
var executor = new PreExecutor({
defaultLoaderOptions: (function () {
return this;
})().__internConfig,
executorId: 'client'
});
var promise = executor.run();
if (exitHandler) {
exitHandler(process, promise, 10000);
}
});
}