Script minification bash scripts are added.

This commit is contained in:
Said Tahsin Dane 2015-02-18 17:31:10 +02:00
parent 5ab408316f
commit 7f25a9a22d
2 changed files with 21 additions and 0 deletions

View file

@ -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

View file

@ -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