Skip to content

Commit

Permalink
Script minification bash scripts are added.
Browse files Browse the repository at this point in the history
  • Loading branch information
tasomaniac committed Feb 18, 2015
1 parent 5ab4083 commit 7f25a9a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
17 changes: 17 additions & 0 deletions automation/minifying/minify_js.sh
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions automation/minifying/minify_scripts_js.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 7f25a9a

Please sign in to comment.