]> git.mxchange.org Git - friendica.git/blob - util/minifyjs.sh
basic video playback support using VideoJS
[friendica.git] / util / minifyjs.sh
1 #!/bin/bash
2
3 command -v uglifyjs >/dev/null 2>&1 || { echo >&2 "I require UglifyJS but it's not installed.  Aborting."; exit 1; }
4
5 MINIFY_CMD=uglifyjs
6
7 JSFILES=(
8         "js/acl.js"
9         "js/ajaxupload.js"
10         "js/country.js"
11         "js/fk.autocomplete.js"
12         "js/jquery.htmlstream.js"
13         "js/main.js"
14         "js/webtoolkit.base64.js"
15         "view/theme/frost/js/acl.js"
16         "view/theme/frost/js/fk.autocomplete.js"
17         "view/theme/frost/js/jquery.divgrow-1.3.1.f1.js"
18         "view/theme/frost/js/main.js"
19         "view/theme/frost/js/theme.js"
20         "view/theme/frost-mobile/js/acl.js"
21         "view/theme/frost-mobile/js/fk.autocomplete.js"
22         "view/theme/frost-mobile/js/jquery.divgrow-1.3.1.f1.js"
23         "view/theme/frost-mobile/js/main.js"
24         "view/theme/frost-mobile/js/theme.js"
25         "view/theme/decaf-mobile/js/theme.js"
26 )
27 JSFILES2=(
28         "library/colorbox/jquery.colorbox.js"
29 )
30 JSFILES3=(
31         "library/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin_src.js"
32 )
33
34 for i in ${JSFILES[@]}
35 do
36         MINFILE=${i%%.js}.min.js
37         echo "Minifying $i into $MINFILE"
38         rm $MINFILE
39         $MINIFY_CMD -o $MINFILE $i
40 done
41
42 for i in ${JSFILES2[@]}
43 do
44         MINFILE=${i%%.js}-min.js
45         echo "Minifying $i into $MINFILE"
46         rm $MINFILE
47         $MINIFY_CMD -o $MINFILE $i
48 done
49
50 for i in ${JSFILES3[@]}
51 do
52         MINFILE=${i%%_src.js}.js
53         echo "Minifying $i into $MINFILE"
54         rm $MINFILE
55         $MINIFY_CMD -o $MINFILE $i
56 done
57