8787 < a href ="http://github.com/documentcloud/jammit/ "> Jammit</ a > is an
8888 industrial strength asset packaging library for < b > Rails</ b > , providing
8989 both the CSS and JavaScript concatenation and compression
90- that you'd expect, as well as < b > YUI Compressor</ b > and < b > Closure Compiler</ b >
90+ that you'd expect, as well as < b > YUI Compressor</ b > , < b > Closure Compiler</ b > , and < b > UglifyJS </ b >
9191 compatibility, ahead-of-time gzipping, built-in JavaScript template
9292 support, and optional < b > Data-URI / MHTML image and font embedding</ b > .
9393 </ p >
9494
9595 < p >
96- < b > Current Version:</ b > < a href ="http://rubygems.org/gems/jammit/ "> 0.6.0 </ a >
96+ < b > Current Version:</ b > < a href ="http://rubygems.org/gems/jammit/ "> 0.6.1 </ a >
9797 </ p >
9898
9999 < p >
@@ -113,7 +113,7 @@ <h2>Table of Contents</h2>
113113 < a href ="#installation "> Installation</ a > |
114114 < a href ="#configuration "> Configuration</ a > |
115115 < a href ="#usage "> Usage</ a > |
116- < a href ="#compressors "> YUI & Closure </ a > |
116+ < a href ="#compressors "> YUI, Closure & UglifyJS </ a > |
117117 < a href ="#precaching "> Precaching Assets</ a > < br />
118118 < a href ="#expires "> Expires Headers</ a > |
119119 < a href ="#embedding "> Embedding Assets</ a > |
@@ -161,8 +161,9 @@ <h2 id="installation">Installation</h2>
161161
162162 < p >
163163 < i > Note: If you don't already have the
164- < a href ="http://github.com/sstephenson/ruby-yui-compressor "> ruby-yui-compressor</ a > or
165- < a href ="http://github.com/documentcloud/closure-compiler "> closure-compiler</ a >
164+ < a href ="http://github.com/sstephenson/ruby-yui-compressor "> ruby-yui-compressor</ a > ,
165+ < a href ="http://github.com/documentcloud/closure-compiler "> closure-compiler</ a > or
166+ < a href ="https://github.com/lautis/uglifier "> uglifier</ a >
166167 gems installed, downloading make take a minute — the jar files together
167168 weigh in at 5 megabytes.</ i >
168169 </ p >
@@ -231,7 +232,7 @@ <h2 id="configuration">Configuration</h2>
231232 < td > < tt > on | off</ tt > </ td >
232233 < td class ="definition ">
233234 Defaults to < b > on</ b > . When < b > off</ b > , JavaScript and CSS packages
234- will be left uncompressed (by YUI or Closure ). Disabling compression is only recommended
235+ will be left uncompressed (by YUI, Closure, or UglifyJS ). Disabling compression is only recommended
235236 if you're packaging assets in development.
236237 </ td >
237238 </ tr >
@@ -247,12 +248,12 @@ <h2 id="configuration">Configuration</h2>
247248 </ tr >
248249 < tr >
249250 < td > < b > javascript_compressor</ b > </ td >
250- < td > < tt > yui | closure</ tt > </ td >
251+ < td > < tt > yui | closure | uglifier </ tt > </ td >
251252 < td class ="definition ">
252- Defaults to < b > yui</ b > . As of < b > 0.2.0 </ b > , the Jammit gem can use either the
253- < a href ="http://developer.yahoo.com/yui/compressor/ "> YUI Compressor</ a >
254- or the
255- < a href ="http ://code.google. com/closure/compiler / "> Google Closure Compiler </ a >
253+ Defaults to < b > yui</ b > . The Jammit gem can use either the
254+ < a href ="http://developer.yahoo.com/yui/compressor/ "> YUI Compressor</ a > , the
255+ < a href =" http://code.google.com/closure/compiler/ " > Google Closure Compiler </ a > , or
256+ < a href ="https ://github. com/mishoo/UglifyJS / "> UglifyJS </ a >
256257 to compress your JavaScript.
257258 </ td >
258259 </ tr >
@@ -314,8 +315,9 @@ <h2 id="configuration">Configuration</h2>
314315 < td class ="definition ">
315316 Pass an options hash directly to the underlying JavaScript compressor
316317 to configure it. See the
317- < a href ="http://github.com/sstephenson/ruby-yui-compressor "> ruby-yui-compressor</ a > or
318- < a href ="http://github.com/documentcloud/closure-compiler "> closure-compiler</ a >
318+ < a href ="http://github.com/sstephenson/ruby-yui-compressor "> ruby-yui-compressor</ a > ,
319+ < a href ="http://github.com/documentcloud/closure-compiler "> closure-compiler</ a > , or
320+ < a href ="https://github.com/lautis/uglifier "> uglifier</ a >
319321 gem documentation for the full list of available options.
320322 </ td >
321323 </ tr >
@@ -377,23 +379,25 @@ <h2 id="usage">Usage</h2>
377379 < pre > require 'jammit'
378380Jammit.package!</ pre >
379381
380- < h2 id ="compressors "> YUI & Closure </ h2 >
382+ < h2 id ="compressors "> YUI, Closure & UglifyJS </ h2 >
381383
382384 < p >
383- Jammit can be configured to use either the
384- < a href ="http://developer.yahoo.com/yui/compressor/ "> YUI Compressor</ a > or the
385- < a href ="http://code.google.com/closure/compiler/ "> Google Closure Compiler</ a >
385+ Jammit can be configured to use the
386+ < a href ="http://developer.yahoo.com/yui/compressor/ "> YUI Compressor</ a > , the
387+ < a href ="http://code.google.com/closure/compiler/ "> Google Closure Compiler</ a > , or
388+ < a href ="https://github.com/mishoo/UglifyJS/ "> UglifyJS</ a >
386389 to compress and optimize your JavaScript. (CSS is always run through the
387- YUI Compressor.) Specify the < b > javascript_compressor</ b > to choose either < b > yui</ b >
388- or < b > closure </ b > backends. If left blank, Jammit defaults to < b > yui</ b > .
390+ YUI Compressor.) Specify the < b > javascript_compressor</ b > to choose either < b > yui</ b > ,
391+ < b > closure </ b > , or < b > uglifier </ b > backends. If left blank, Jammit defaults to < b > yui</ b > .
389392 </ p >
390393
391394 < p >
392395 You can configure the JavaScript compilation by adding < b > compressor_options</ b >
393396 to your < b > assets.yml</ b > . The < b > compressor_options</ b >
394397 will be passed directly to the Gem backend of your chosen compressor. See the
395- < a href ="http://github.com/sstephenson/ruby-yui-compressor "> ruby-yui-compressor</ a > or
396- < a href ="http://github.com/documentcloud/closure-compiler "> closure-compiler</ a >
398+ < a href ="http://github.com/sstephenson/ruby-yui-compressor "> ruby-yui-compressor</ a > ,
399+ < a href ="http://github.com/documentcloud/closure-compiler "> closure-compiler</ a > , or
400+ < a href ="https://github.com/lautis/uglifier "> uglifier</ a >
397401 gem documentation for all the available options. For example, to configure
398402 the Closure Compiler to use its
399403 < a href ="http://code.google.com/closure/compiler/docs/compilation_levels.html "> advanced optimizations</ a > ,
@@ -688,6 +692,17 @@ <h2 id="jst">JavaScript Templates</h2>
688692
689693 < h2 id ="changes "> Change Log</ h2 >
690694
695+ < p >
696+ < b class ="header "> 0.6.1</ b > — < small > < i > May 25, 2011</ i > </ small > < br />
697+ Jammit now supports < b > UglifyJS</ b > as a Java-free alternative to YUI and Closure,
698+ for JavaScript compression.
699+ You can now pass < tt > --packages core,embed,ui</ tt > to the < tt > jammit</ tt >
700+ command, in order to only build a subset of your asset packages.
701+ The built-in JS templating function has been upgraded to the equivalent of
702+ the latest < tt > _.template</ tt > .
703+ Environment-specific settings are now supported in your < tt > assets.yml</ tt > file.
704+ </ p >
705+
691706 < p >
692707 < b class ="header "> 0.6.0</ b > < br />
693708 You can now pass < tt > debug_assets=true</ tt > as a query parameter to debug
0 commit comments