2009年6月17日水曜日

Code Compression Tools for JavaScript

Introduction YUI into your system is easy.
The requirements is:
Java (ver 1.4.2) and Rhino.

Install Rhino
# Download the latest Rhino
wget -O /tmp/rhino.zip ftp://ftp.mozilla.org/pub/mozilla.org/js/rhino1_7R2.zip
cd /tmp
unzip rhino.zip

# move js.jar where Java can find it.
mkdir ~/Library/Java/Extensions;
mv /tmp/rhino1_7R2/js.jar ~/Library/Java/Extensions/

# Launch Rhino
java org.mozilla.javascript.tools.shell.Main

# Download the YUI compressor
wget -P /tmp/ http://www.julienlecomte.net/yuicompressor/yuicompressor-2.4.2.zip
cd /tmp
unzip yuicompressor-2.4.2.zip

#