-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathbuild.sh
executable file
·51 lines (39 loc) · 1.34 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
49
50
51
#!/bin/sh
rm -rf build
mkdir -p build
mkdir -p build/tmp
#mkdir -p build/css
mkdir -p build/fonts
mkdir -p build/fontawesome
mkdir -p build/images
vulcanize \
--inline-scripts \
--inline-css \
--strip-comments \
--exclude "conf/config.js" \
--exclude "conf/theme.html" \
genome-maps-index.html \
| crisper \
--html build/tmp/index.html \
--js build/tmp/genome-maps.js
uglifyjs build/tmp/genome-maps.js > build/tmp/genome-maps.min.js
sed -i [email protected]@genome-maps.min.js@g build/tmp/index.html
#fix paths
sed -i s@lib/jsorolla/styles/fonts/@fonts/@g build/tmp/index.html
cp -r lib/jsorolla/styles/fonts/* build/fonts/
sed -i s@lib/jsorolla/bower_components/fontawesome/fonts/@fontawesome/fonts/@g build/tmp/index.html
sed -i s@bower_components/fontawesome/fonts/@fontawesome/fonts/@g build/tmp/index.html
cp -r bower_components/fontawesome/css build/fontawesome/
cp -r bower_components/fontawesome/fonts build/fontawesome/
sed -i s@lib/jsorolla/styles/img/@images/@g build/tmp/index.html
cp -r lib/jsorolla/styles/img/* build/images/
##sed -i s@src/images/@images/@g build/tmp/index.html
##cp -r src/images/* build/images/
# end fix paths
#cp LICENSE build/
cp README.md build/
mv build/tmp/index.html build/
mv build/tmp/genome-maps.js build/
mv build/tmp/genome-maps.min.js build/
cp -r conf build/
rm -rf build/tmp