-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·41 lines (35 loc) · 1.15 KB
/
build.sh
File metadata and controls
executable file
·41 lines (35 loc) · 1.15 KB
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
#!/bin/sh
# remove old
rm -rf ../apps4finlands-build
# compile coffee
for i in `find js -maxdepth 4 -mindepth 0 -type f -name "*.coffee"`; do
file=$i
name=${file%.*}
coffee --compile $i
sed -i -e's/cs\!//g' $name.js
done
# optimize
node js/r.js -o js/build.js
# remove not needed files
rm -R -rf ../apps4finlands-build/.git
rm -rf ../apps4finlands-build/.gitignore
rm -rf ../apps4finlands-build/build.sh
rm -rf ../apps4finlands-build/build.txt
rm -rf ../apps4finlands-build/README.md
rm -rf ../apps4finlands-build/js/libs/modernizr-2.5.3.js
rm -rf ../apps4finlands-build/js/libs/jquery-1.8.0.js
rm -rf ../apps4finlands-build/js/libs/lodash-0.4.2.js
rm -rf ../apps4finlands-build/js/libs/backbone-0.9.2.js
rm -rf ../apps4finlands-build/js/libs/RouteBoxer.js
rm -rf ../apps4finlands-build/js/libs/OpenLayers.mobile.js
#rm -rf ../apps4finlands-build/js/settings.js
# remove the coffee file from prod
for i in `find js -maxdepth 2 -mindepth 0 -type f -name "*.coffee"`; do
file=$i
name=${file%.*}
rm -rf $name.js
rm -rf ../apps4finlands-build/$i
done
# dev coffee removed
rm -rf ../apps4finlands-build/js/libs/cs.js
rm -rf ../apps4finlands-build/js/libs/coffee-script.js