Created
May 14, 2013 07:52
-
-
Save YusukeHirao/5574359 to your computer and use it in GitHub Desktop.
Finder上でJavaScriptの圧縮 ref: http://qiita.com/items/33d93d2bc6a94191dd7a
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
# nodeやenvのPATHを通しておく | |
PATH=/usr/local/bin:/bin:/usr/bin:$PATH | |
export PATH | |
for f in "$@" | |
do | |
dir=`dirname "$f"` | |
file=`basename "$f"` | |
name=`basename "$f" .js` | |
cd $dir | |
# uglifyjsはフルパスで | |
/usr/local/bin/uglifyjs $file > "$name.min.js" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment