-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmain.coffee.in
51 lines (46 loc) · 1.43 KB
/
main.coffee.in
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
<$
sections=()
for sectionModule in */*Section.coffee; do
[ -s "$sectionModule" ] || continue
s=$(basename "$sectionModule" .coffee)
sections+=("$s")
done
$>
require.config {
shim:
underscore:
exports: "_"
d3:
exports: "d3"
deps: ["jquery"]
bootstrap : ["jquery"]
knockout : ["jquery"]
jsrender : ["jquery"]
"jquery.ui.selectable" : ["jquery.ui.mouse"]
"jquery.ui.sortable" : ["jquery.ui.mouse"]
"jquery.ui.mouse" : ["jquery.ui.widget"]
"jquery.ui.widget" : ["jquery.ui.core"]
"jquery.ui.core" : ["jquery"]
"jquery.dataTables.sorting.num-html" : ["jquery.dataTables"]
"jquery.dataTables.type-detection.num-html" : ["jquery.dataTables"]
"jquery.dataTables.ColReorder" : ["jquery.dataTables"]
"jquery.dataTables.Scroller" : ["jquery.dataTables"]
"jquery.dataTables.bootstrap" : ["jquery.dataTables", "bootstrap"]
}
require [
"jquery"
"bootstrap"
"3x"
<$ for s in "${sections[@]}"; do $>"<$= "$s" $>"
<$ done $>
], ($, ignore, _3X_
<$ for s in "${sections[@]}"; do $>, <$= "$s" $>
<$ done $>
) ->
# initialize each section
<$ for s in "${sections[@]}"; do
$>_3X_.<$= "$s" $> = <$= "$s" $>
<$ done $>
# expose ThreeX to the outside world
window._3X_ = _3X_
# vim:ft=coffee