-
Notifications
You must be signed in to change notification settings - Fork 94
/
build.sh
executable file
·48 lines (43 loc) · 1 KB
/
build.sh
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
#!/bin/sh
set -e
if [[ $1 == "debug" ]]; then
echo Debug build, not minified.
MINIFY=cat
DEBUG_CODE=html/src/fakeworker-0.1.js
else
MINIFY=jsmin
DEBUG_CODE=
fi
# Worker thread (plain JS version)
(
cat html/src/header.js
(
coffee -c -p html/src/worker-noasm.coffee
) | $MINIFY
) > html/rayworker.js
# Worker thread (asm.js version)
(
cat html/src/header.js
(
cat html/src/worker-asm-core.js
coffee -c -p html/src/worker-asm-shell.coffee
) | $MINIFY
) > html/rayworker-asm.js
# Main file
(
cat html/src/header.js
(
cat \
html/src/jquery-1.9.1.min.js \
html/src/jquery.hotkeys.js \
html/src/asmjs-feature-test.js \
$DEBUG_CODE
(
cat \
html/src/zen-renderer.coffee \
html/src/zen-widgets.coffee \
html/src/zen-ui.coffee \
html/src/zen-setup.coffee
) | coffee -p -s
) | $MINIFY
) > html/zenphoton.js