Pedro Algarvio, aka, s0undt3ch wrote: > On Jan 2, 3:42 pm, Ian Bicking <[EMAIL PROTECTED]> wrote: >> Pedro Algarvio, aka,s0undt3chwrote: >> >>> This is an idea that I'm currently using on a project of mine. >>> If I've catched your attention, you can read more about it on: >>> http://blog.ufsoft.org/index.php/2007/12/31/webhelpers-and-javascript... >>> Best Regards, and a Happy New Year!!!!! >> BTW, there's a command in WebHelpers for doing minification. If you add >> this to setup.cfg: >> >> [global] >> command_packages = tasktracker.distutils_commands >> >> [aliases] >> build = compress_resources build >> >> [compress_resources] >> resource_dirs = <PACKAGE>/public/javascripts >> <PACKAGE>r/public/stylesheets >> >> Then when you run "python setup.py compress_resources" (or just >> install/build the package, due to the alias) it will create >> compressed.js and compressed.css. It uses the ShrinkSafe minimizer; I >> don't know which are better, but ShrinkSafe was easy to setup (it's a >> web service). >> >> If you have any interest in submitting a patch to better integrate these >> pieces I'm sure that would be appreciated. >> >> -- >> Ian Bicking : [EMAIL PROTECTED] :http://blog.ianbicking.org > > Ok, some more stats regarding this subject. > > Talking about size: > -rw-r--r-- 1 vampas vampas 80469 2007-12-25 13:45 jquery-latest.js --> > Uncompressed jQuery library > -rw-r--r-- 1 vampas vampas 46480 2007-12-31 16:22 jquery- > latest.JSMin.js --> Minified by JSMin > -rw-r--r-- 1 vampas vampas 46437 2008-01-02 16:52 jquery-latest.min.js > --> Minified and Gziped downloaded on jQuery.com > -rw-r--r-- 1 vampas vampas 45418 2008-01-02 16:41 jquery- > latest.shrinksafe.with-new-lines.js --> self explanatory > -rw-r--r-- 1 vampas vampas 43550 2008-01-02 16:44 jquery- > latest.shrinksafe.without-new-lines.js --> self explanatory > > From the above you see some size differences, which might not matter > that much, all work, but, the files compressed from shrinksafe are > actually not that safe, both gave me JS error and made the jQuery > library un-usable. > > I saw a blog post which states that the Yahoo compressor is even > better but I haven't tried that one.
I've used ShrinkSafe on YUI and it worked fine. I'm surprised it didn't work on jquery, it's supposed to be a pretty safe shrinker. A flag you could put in setup.cfg to choose the shrinker to use would be ideal. Last I looked Yahoo didn't seem to have a service that did shrinking, and the installation was non-trivial. The ease of using ShrinkSafe was really its biggest selling point for me. Note that the helper also combines Javascript files, which perhaps more important than shrinking the files. -- Ian Bicking : [EMAIL PROTECTED] : http://blog.ianbicking.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" 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/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
