Just to be clear, "packaging" tools for JS fall into in 2 distinct  
camps:

1) Minification - removing comments, whitespace, etc. Doesn't change  
any of your code, just squishes it up.

2) Compression/Packing - Minification plus identifier replacement,  
code optimization, etc.  Could do all sorts of crazy things to your  
code to make it smaller.

YUI compressor is camp #2, JSMin is camp #1.  I've personally always  
found JSMin and concatenation into a single file to be enough for most  
purposes (80% of the gain). It also has the side effect of being  
completely safe (unless you are in the habit of leaving out semi- 
colons which I don't recommend (try JSLint).

Cheers,
Josh

On 14/07/2009, at 10:51 AM, Chris Lloyd wrote:

> 2009/7/14 Brian Chiha <[email protected]>
> I'm at the tail end of an RoR project with a heap of Javascript files
> (ExtJS).  Has anyone used a JS Minifier written in Ruby (Preferable),
> that can minify and join files?  We use Deprec, so getting in working
> via a release shouldn't be a hassle...
>
> Brian,
>
> The only sort of minifier worth its weight is one that does some  
> sort of lexical analysis of the JS source tree. The best of breed at  
> the moment is the YUI Compressor. It's not Ruby, it's Java and uses  
> Mozilla's Spidermonkey, but that should hardly matter. Have a look  
> at this talk for a good understanding of exactly what it does and  
> what is involved when you want a proper JS "minifier".
>
> Cheers,
>
> Chris
>
> -- 
> chrislloyd.com.au
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
or Rails Oceania" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rails-oceania?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to