-
Notifications
You must be signed in to change notification settings - Fork 26
/
compile.sh
executable file
·69 lines (56 loc) · 3.09 KB
/
compile.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/bin/sh
export version1964="0.4.9"
minified="1964js-$version1964.min.js"
closure="closure-compiler-v20180610"
echo Compiling index.html
slimrb index.slim --pretty index.html
if test $? -ne 0
then
echo Compilation aborted. Please fix slim errors first.
exit $?
else
echo done.
fi
echo Compiling debug.html
slimrb index.slim --pretty debug.html
if test $? -ne 0
then
echo Compilation aborted. Please fix slim errors first.
exit $?
else
echo done.
fi
mkdir obj/
mkdir css/
sass sass/style.sass:css/style.css
echo Running CoffeeLint...
coffeelint -f coffeelint.json coffee/*.coffee
if test $? -ne 0
then
echo Compilation aborted. Please fix CoffeeLint errors first.
exit $?
else
echo done.
fi
echo Compiling coffee files ...
coffee -c -o obj/ coffee/
if test $? -ne 0
then
echo Minification aborted. Please fix CoffeeScript errors first.
exit $?
else
echo done.
echo minifying io.js as io.min.js ...
java -jar $closure.jar --compilation_level SIMPLE_OPTIMIZATIONS --language_in=ES6_STRICT --js lib/bitjs/io.js --js_output_file lib/bitjs/io.min.js
echo done.
echo minifying archive js as archive.min.js ...
java -jar $closure.jar --compilation_level SIMPLE_OPTIMIZATIONS --language_in=ES6_STRICT --js lib/bitjs/archive-modded-to-point-to-minified.js --js_output_file lib/bitjs/archive.min.js
echo done.
echo minifying unzip.js as unzip.min.js ...
java -jar $closure.jar --compilation_level SIMPLE_OPTIMIZATIONS --language_in=ES6_STRICT --js lib/bitjs/unzip-modded-to-point-to-minified.js --js_output_file lib/bitjs/unzip.min.js
echo done.
echo minifying as $minified ...
#java -jar $closure.jar --compilation_level SIMPLE_OPTIMIZATIONS --language_in=ES6_STRICT --js obj/constants.js --js lib/BigInt-modded-forES6.js --js lib/closure/goog/base.js --js obj/1964.js --js lib/mainLoop.js --js obj/helpers.js --js obj/opcodeMap.js --js obj/boot.js --js lib/closure/goog/math/long.js --js obj/pif.js --js obj/keyboard.js --js obj/memory.js --js obj/gen.js --js obj/audio.js --js obj/dma.js --js obj/interrupts.js --js lib/glMatrix-0.9.5.min.js --js lib/webgl-utils.js --js obj/renderer.js --js obj/videoHLE.js --js obj/gfxHelpers.js --js obj/webGL.js --js lib/bitjs/io.min.js --js lib/bitjs/archive.min.js --js obj/ui.js --js_output_file lib/$minified
java -jar $closure.jar --compilation_level SIMPLE_OPTIMIZATIONS --language_in=ES6_STRICT --js obj/constants.js --js lib/BigInt-modded-forES6.js --js lib/closure/goog/base.js --js obj/1964.js --js lib/mainLoop.js --js obj/helpers.js --js obj/opcodeMap.js --js obj/boot.js --js lib/closure/goog/math/long.js --js obj/pif.js --js obj/pif_le.js --js obj/keyboard.js --js obj/memory.js --js obj/memory_le.js --js obj/gen.js --js obj/audio.js --js obj/dma.js --js obj/dma_le.js --js obj/interrupts.js --js lib/glMatrix-0.9.5.min.js --js lib/webgl-utils.js --js obj/renderer.js --js obj/renderer_le.js --js obj/videoHLE.js --js obj/gfxHelpers.js --js obj/gfxHelpers_le.js --js obj/webGL.js --js lib/bitjs/io.js --js lib/bitjs/archive-modded-to-point-to-minified.js --js obj/ui.js --js_output_file lib/$minified
echo done.
fi