diff --git a/automation/minifying/minify_js.sh b/automation/minifying/minify_js.sh new file mode 100755 index 0000000..9323806 --- /dev/null +++ b/automation/minifying/minify_js.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +if [ "$#" -ne 1 ]; then + FILES="../../js"; +else + FILES=$1; +fi + + +for f in $FILES/*.js; +do + if [[ $f != *".min"* ]]; then + echo "Processing $f ..." + echo "java -jar yuicompressor-2.4.8.jar $f -o ${f%.js}.min.js" + java -jar yuicompressor-2.4.8.jar $f -o ${f%.js}.min.js + fi +done \ No newline at end of file diff --git a/automation/minifying/minify_scripts_js.sh b/automation/minifying/minify_scripts_js.sh new file mode 100755 index 0000000..00b8534 --- /dev/null +++ b/automation/minifying/minify_scripts_js.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +echo "Optimizing scripts.js to scripts.min.js" +java -jar yuicompressor-2.4.8.jar ../../js/scripts.js -o ../../js/scripts.min.js \ No newline at end of file