blob: 8ce7e4e22b1ad0d680c527e78b54808d0c6c8ecc (
plain)
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
|
#!/bin/bash
css="base links title table form button alert tooltip header board project task comment subtask markdown listing activity dashboard pagination popover confirm sidebar responsive font-awesome.min jquery-ui-1.10.4.custom chosen.min"
js="jquery-1.11.1.min jquery-ui-1.10.4.custom.min jquery.ui.touch-punch.min chosen.jquery.min minify.min"
minify="base board task analytic init"
rm -f assets/js/minify* 2>/dev/null
rm -f assets/js/app.js 2>/dev/null
rm -f assets/css/app.css 2>/dev/null
echo "/* DO NOT EDIT: auto-generated file */" > assets/css/app.css
# merge css
for file in $css
do
cat "assets/css/${file}.css" >> assets/css/app.css
done
# minify
for file in $minify
do
cat "assets/js/${file}.js" >> assets/js/minify.js
done
curl -s \
-d compilation_level=SIMPLE_OPTIMIZATIONS \
-d output_format=text \
-d output_info=compiled_code \
--data-urlencode "js_code@assets/js/minify.js" \
http://closure-compiler.appspot.com/compile > assets/js/minify.min.js
# concat app.js
for file in $js
do
cat "assets/js/${file}.js" >> assets/js/app.js
done
rm -f assets/js/minify* 2>/dev/null
|