Created
June 28, 2016 18:21
-
-
Save dplord/97129014b629c0e5b5d38e38eafd8912 to your computer and use it in GitHub Desktop.
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/sh | |
#开启压缩css js的,压缩当前页面的所有css js | |
#cp /tmp/yuicompressor-2.4.8.jar 到/tmp | |
#然后这个脚本在你需要压缩css js的目录执行即可 | |
a="/home/dengpan/www" | |
for i in `find $a -name "*.css"` | |
do | |
echo $i | |
java -jar yuicompressor-2.4.8.jar --type css --charset utf-8 -v $i -o $i | |
done | |
for i in `find $a -name "*.js"` | |
do | |
echo $i | |
java -jar yuicompressor-2.4.8.jar --type js --charset utf-8 -v $i -o $i | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment