-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
29 lines (24 loc) · 1.19 KB
/
Makefile
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
default: build
compile:
haxe build.hxml
build: compile
mkdir -p build
cat src/before.html > build/index.html
cat temp/main.js >> build/index.html
cat src/after.html >> build/index.html
cp deps/w.min.full.js build/
retail: compile
mkdir -p retail
# terser --compress unsafe_arrows=true,unsafe=true,toplevel=true,passes=8 --mangle --mangle-props --toplevel --ecma 6 -O ascii_only=true -- temp/main.js > temp/main.min.js
terser --compress unsafe_arrows=true,unsafe=true,toplevel=true,passes=8 --mangle --toplevel --ecma 6 -O ascii_only=true -- temp/main.js > temp/main.min.js
# terser --compress unsafe_arrows=true,unsafe=true,toplevel=true,passes=1 --mangle --mangle-props reserved=['plane','cube','spaceship','camera','light','move','sphere','group','textures','add','_setTimeout','vertices','indices'] --toplevel --ecma 6 -O ascii_only=true -- temp/main.js > temp/main.min.js
cat src/before.html > retail/index.html
cat temp/main.min.js >> retail/index.html
cat src/after.html >> retail/index.html
cp deps/w.min.full.js retail/
stat retail/index.html | grep Size
zip: retail
rm -f retail/index.zip
cd retail && zip index.zip index.html
stat retail/index.zip | grep Size
.PHONY: build retail