-
Notifications
You must be signed in to change notification settings - Fork 74
/
gen-dist
executable file
·24 lines (20 loc) · 971 Bytes
/
gen-dist
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env bash
mkdir -p dist
echo "build src/loading-bar.ls ..."
./node_modules/.bin/lsc -cbp src/loading-bar.ls > dist/loading-bar-raw.js
echo "build src/presets.ls ..."
./node_modules/.bin/lsc -cbp src/presets.ls > dist/presets.js
echo "build src/loading-bar.styl -> dist/loading-bar.css ..."
./node_modules/.bin/stylus -p src/loading-bar.styl > dist/loading-bar.css
echo "bundle loading-bar ..."
./node_modules/.bin/browserify dist/loading-bar-raw.js > dist/loading-bar.js
rm -f dist/loading-bar-raw.js
rm -f dist/presets.js
echo "minifying loading-bar.js ..."
./node_modules/.bin/uglifyjs dist/loading-bar.js > dist/loading-bar.min.js
echo "minifying loading-bar.css ..."
./node_modules/.bin/uglifycss dist/loading-bar.css > dist/loading-bar.min.css
echo "zip loading-bar.js and loading-bar.css ..."
rm -f dist/loading-bar.zip
zip -r dist/loading-bar.zip dist/loading-bar.js dist/loading-bar.css dist/loading-bar.min.js dist/loading-bar.min.css
echo "done."