-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
20 lines (17 loc) · 872 Bytes
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
echo
echo 'Compiling LESS to CSS...'
lessc cloudcache/assets/less/build.less > cc-temp.css
echo
echo 'Combining all CSS...'
for f in cloudcache/assets/css/*.css; do (cat "${f}"; echo) >> temp.css; done
cat cc-temp.css >> temp.css
rm cc-temp.css
echo
echo 'Minifying CSS...'
cleancss --skip-rebase -o cloudcache/static/css/cc.min.css temp.css
rm temp.css
echo
echo 'Concatenating and minifying Javascript...'
uglifyjs cloudcache/assets/js/jquery-2.1.0.min.js cloudcache/assets/js/jquery-ui.min.js cloudcache/assets/js/bootstrap.min.js cloudcache/assets/js/jquery-confirm.min.js cloudcache/assets/js/icheck.min.js cloudcache/assets/js/handlebars.js cloudcache/assets/js/cloudcache/app.js cloudcache/assets/js/jquery.mCustomScrollbar.concat.min.js -c -o cloudcache/static/js/cc.min.js 2> err.tmp
cat err.tmp | grep -v WARN | grep -v 'Use console.error instead'
rm err.tmp