forked from cmdjs/gallery
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
63 lines (60 loc) · 1.93 KB
/
index.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=0">
<title>Gallery</title>
<link href="mocha/dist/mocha.css" type="text/css" rel="stylesheet" charset="utf-8">
<script src="mocha/dist/mocha.js"></script>
<script src="sea-modules/seajs/seajs/2.1.1/sea.js"></script>
<script src="sea-modules/seajs/seajs-style/1.0.0/seajs-style.js"></script>
<script src="sea-modules/jquery/jquery/1.7.2/jquery.js"></script>
<script type="text/javascript">
seajs.config({
alias: {
'$': 'jquery/jquery/1.7.2/jquery',
'jquery': 'jquery/jquery/1.7.2/jquery'
},
map: [
function(url) {
var regex = /gallery\/([^\/]*?)\/\d+\..*?\/(.*)$/
if (regex.test(url)) {
url = url.replace('sea-modules/', '');
return url.replace(regex, '$1/dist/$2')
}
return url;
}
]
});
</script>
</head>
<body>
<div id="mocha">Modules in Gallery</div>
<script>
seajs.use('gallery/expect/1.0.0/expect', function(expect) {
mocha.setup('bdd');
var modules = [
'backbone', 'expect', 'handlebars',
'jsuri', 'keymaster', 'respond',
'moment', 'mustache', 'scrollmonitor',
'sinon', 'store', 'swfobject',
'underscore', 'zepto', 'ztree', 'morris',
'mathjs', 'list', 'zeroclipboard', 'bootstrap',
'raphael', 'placeholders', 'keypress',
'formatter', 'spin', 'blueimp-md5'
]
var specs = []
for (var i = 0; i < modules.length; i++) {
specs[i] = './' + modules[i] + '/spec.js'
}
seajs.use(specs, function() {
if (window.mochaPhantomJS) {
mochaPhantomJS.run()
} else {
mocha.run()
}
})
});
</script>
</body>
</html>