forked from MattiaFortunati/Reverse-Ground-Battle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
29 lines (22 loc) · 837 Bytes
/
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
#minifies all js, then create a zip with all the needed files
#echoing the final file size
#minify and build zip
echo "starting build"
rm ReverseGroundBattle.zip
mkdir tmp
cd tmp
echo "minifying js"
curl -X POST -s --data-urlencode 'input@../source/game.js' http://javascript-minifier.com/raw > game.js
curl -X POST -s --data-urlencode 'input@../source/jallegro.js' http://javascript-minifier.com/raw > jallegro.js
curl -X POST -s --data-urlencode 'input@../source/jsfxr.js' http://javascript-minifier.com/raw > jsfxr.js
echo "copying"
cp ../source/index.html index.html
echo "zipping"
zip ../ReverseGroundBattle.zip game.js jallegro.js jsfxr.js index.html
echo "clearing"
cd ../
rm -rf tmp
echo "done"
echo "built file size:"
ls -la ReverseGroundBattle.zip | awk '{ print $5}'
ls -lah ReverseGroundBattle.zip | awk '{ print $5}'