LoginSignup
5
5

More than 5 years have passed since last update.

google製のjavascript圧縮処理(Closure compiler)を導入

Posted at

スーパーユーザ

sudo su

srcディレクトリへ移動

cd /usr/local/src/

最新のjarファイル取得

curl -O  https://closure-compiler.googlecode.com/files/compiler-20130227.tar.gz

ちなみに最新版を撮りたい場合

curl -O  https://closure-compiler.googlecode.com/files/compiler-latest.tar.gz

展開

tar zxf compiler-20130227.tar.gz  -C /usr/local/lib/

読み込み権限付与

chmod 755 /usr/local/lib/compiler.jar

minify化実行

java -jar /usr/local/lib/compiler.jar --js=aaa.js --js_output_file=aaa.min.js

複数の場合
bash
java -jar /usr/local/lib/compiler.jar --js=aaa.js --js=bbb.js --js=ccc.js --js_output_file=abc.mix.min.js

では、よいminify生活を

参考

公式
ダウンロードリスト

5
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
5