PackR won’t touch your $supers

Another quick update: PackR received an update today that means that when you use its :shrink_vars mode, it won’t minify any variables called $super. In Prototype, $super is used to implement inheritance and your class definitions will break if you change its name.

I didn’t really want to make PackR inconsistent with Dean’s original, but without this feature Prototype code is essentially unpackable beyond basic whitespace-stripping, and given that Ruby/Rails users are likely to be using Prototype, I figured it was worth the addition. It also lets you specify your own protected variable names — I’ll be updating the docs soon.

To update, just gem install packr or

ruby script/plugin install
    http://svn.jcoglan.com/packr/trunk/packr






One Response to “PackR won’t touch your $supers”

Hi, I’m trying to minify Prototype 1.6.0, and have come across this very problem. However, I haven’t delved into Ruby yet - would you consider posting the compressed prototype file?

Cheers,
Iain

Iain added these pithy words on Dec 27 07 at 5:48 pm

Leave a Reply