dir/util/minifyjs.sh

56 lines
1.1 KiB
Bash
Raw Normal View History

2013-02-01 03:05:27 +01:00
#!/bin/bash
MINIFY_CMD=uglifyjs
JSFILES=(
"js/acl.js"
"js/ajaxupload.js"
"js/country.js"
"js/fk.autocomplete.js"
"js/jquery.htmlstream.js"
"js/main.js"
"js/webtoolkit.base64.js"
"view/theme/frost/js/acl.js"
"view/theme/frost/js/fk.autocomplete.js"
"view/theme/frost/js/jquery.divgrow-1.3.1.f1.js"
"view/theme/frost/js/main.js"
"view/theme/frost/js/theme.js"
"view/theme/frost-mobile/js/acl.js"
"view/theme/frost-mobile/js/fk.autocomplete.js"
"view/theme/frost-mobile/js/jquery.divgrow-1.3.1.f1.js"
"view/theme/frost-mobile/js/main.js"
"view/theme/frost-mobile/js/theme.js"
"view/theme/decaf-mobile/js/theme.js"
)
2013-02-05 02:16:13 +01:00
JSFILES2=(
"library/colorbox/jquery.colorbox.js"
)
JSFILES3=(
"library/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin_src.js"
)
2013-02-01 03:05:27 +01:00
for i in ${JSFILES[@]}
do
MINFILE=${i%%.js}.min.js
2013-02-05 02:16:13 +01:00
echo "Minifying $i into $MINFILE"
rm $MINFILE
$MINIFY_CMD -o $MINFILE $i
done
for i in ${JSFILES2[@]}
do
MINFILE=${i%%.js}-min.js
echo "Minifying $i into $MINFILE"
rm $MINFILE
$MINIFY_CMD -o $MINFILE $i
done
for i in ${JSFILES3[@]}
do
MINFILE=${i%%_src.js}.js
echo "Minifying $i into $MINFILE"
2013-02-01 03:05:27 +01:00
rm $MINFILE
$MINIFY_CMD -o $MINFILE $i
done