forked from requirejs/requirejs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.html
44 lines (43 loc) · 1.42 KB
/
config.html
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
<!DOCTYPE html>
<html>
<head>
<title>require.js: Config Test</title>
<script type="text/javascript" src="doh/runner.js"></script>
<script type="text/javascript" src="doh/_browserRunner.js"></script>
<script>
function done() {
doh.register(
"config",
[
function config(t){
t.is("blue", s.color);
t.is("dimple-blue", d.color);
t.is("You called a function", f());
}
]
);
doh.run();
}
var s, d, f,
require = {
baseUrl: "./",
paths: {
domReady: '../../domReady/domReady'
},
deps: ["require", "simple", "dimple", "func", "domReady!"],
callback: function (require, simple, dimple, func, doc) {
s = simple;
d = dimple;
f = func;
done();
}
};
</script>
<script type="text/javascript" src="../require.js"></script>
</head>
<body>
<h1>require.js: Config Test</h1>
<p>Tests require being defined as an object with init and domReady plugin usage in configuration.</p>
<p>Check console for messages.</p>
</body>
</html>