forked from metajack/strophejs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.js
42 lines (38 loc) · 1.11 KB
/
main.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
var config;
if (typeof(require) === 'undefined') {
/* XXX: Hack to work around r.js's stupid parsing.
* We want to save the configuration in a variable so that we can reuse it in
* tests/main.js.
*/
require = {
config: function (c) {
config = c;
}
};
}
require.config({
baseUrl: '.',
paths: {
// Strophe.js src files
"strophe-base64": "src/base64",
"strophe-bosh": "src/bosh",
"strophe-core": "src/core",
"strophe": "src/wrapper",
"strophe-md5": "src/md5",
"strophe-sha1": "src/sha1",
"strophe-websocket": "src/websocket",
"strophe-polyfill": "src/polyfills",
// Examples
"basic": "examples/basic",
// Tests
"jquery": "bower_components/jquery/dist/jquery",
"sinon": "bower_components/sinon/index",
"sinon-qunit": "bower_components/sinon-qunit/lib/sinon-qunit",
"tests": "tests/tests"
}
});
if (typeof(require) === 'function') {
require(["strophe"], function(Strophe) {
window.Strophe = Strophe;
});
}