Created
January 15, 2016 10:15
-
-
Save sokil/2907b8a616457b8b99d7 to your computer and use it in GitHub Desktop.
compile_js.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# config | |
jsFilesDir=./../public/js/ | |
compiledJsFilename=compiled.js | |
# init js files array | |
js=( | |
a.js | |
b.js | |
) | |
# create or clear compiled js file | |
compiledJsFile=${jsFilesDir}${compiledJsFilename} | |
cat < /dev/null > $compiledJsFile | |
# compile js files | |
for i in ${js[@]} | |
do | |
jsFile=$jsFilesDir$i | |
echo Complining $jsFile | |
java -jar yuicompressor-2.4.7.jar --type js $jsFile >> $compiledJsFile | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment