Hey!

I've done some several tests with other minificators.  And I would
like to share my thoughts:

* Javascript Minification:

I've tried with YUI Compressor[0] and Closure Compiler[1]. Finally,
I've chosen Closure Compiler.  Because it compress more, the
performance is not bad and as a reference is the compressor used by
jQuery.

The good: Compress more than jsmin.
The bad: Dependency Java.

* CSS MInification

I've tried with YUI Compressor and CSSUtils.  And I've chosen YUI
Compressor.

The good: Compress more than CSSUtils.
The bad: Dependency with Java.

CSSUtils has a bug, when compressing stuff like: width: 10.5% and it's
transformed to 1.5%  And this breaks my layout.

Finally, I've to say that in my case I already have some stuff which
depends on Java, then the dependency doesn't matter.  And if someone
wants a patch, I will post it :)

[0] http://developer.yahoo.com/yui/compressor/
[1] http://code.google.com/closure/compiler/

Néstor.

On Aug 10, 3:42 am, Mike Orr <sluggos...@gmail.com> wrote:
> I found a "jsmin" package on PyPI with the same code. (Actually more
> efficient code, it says, but it's derived from yours and has the same
> license.)  I changed the helper to use the "jsmin" package if
> installed, otherwise to pass Javascript through unchanged and issue a
> warning. The CSS minification is unaffected. The "_jsmin" module now
> raises ImportError and has an explanation in comments.
>
> I released WebHelpers 1.1 with these changes because Fedora's alpha
> freeze was a few days ago, and they said the change was small enough
> it might make it past the freeze. (It doesn't have the other pending
> patch for cascading, because that would be an API change.)
>
> --Mike
>
>
>
>
>
> On Mon, Aug 9, 2010 at 4:09 PM, Domen Kožar <do...@dev.si> wrote:
> > We can make it as optional dependency and provide something else as
> > default minimizer.
>
> > I guess jokes make the world spin, literally.
>
> > Domen
>
> > On Mon, 2010-08-09 at 15:25 -0700, Mike Orr wrote:
> >> Crockford has spoken, so _jsmin.py will have to go. The Fedora people
> >> also contacted him earlier and got a similar response. I don't know
> >> why he's so obstinate: is a joke in a license really more important
> >> than giving the code to everybody who might benefit from it (which
> >> would seem to be the purpose of an MIT-style license).
>
> >> ---------- Forwarded message ----------
> >> From: Douglas Crockford <doug...@crockford.com>
> >> Date: Mon, Aug 9, 2010 at 2:50 PM
> >> Subject: Re: _jsmin.py license
> >> To: Mike Orr <sluggos...@gmail.com>
>
> >>  I don't care what you do so long as you respect my license.
>
> >> On 8/9/2010 2:39 PM, Mike Orr wrote:
>
> >> > Dear Douglas Crawford (and Domen Kozar and Pedro Algarvio)--
>
> >> > I am the maintainer of WebHelpers (webhelpers.groovie.org), a Python
> >> > library that has included _jsmin.py for several years. Recently, a
> >> > Fedora Linux maintainer informed me that the license is not OSS
> >> > compatible per their definition, and so they'd have to remove the
> >> > module from their distribution.
>
> >> >http://bitbucket.org/bbangert/webhelpers/issue/39/non-free-license-of...
>
> >> > Complaint: "The license in _jsmin.py is not a recognized
> >> > OSS-compatible license and has the problematically non-libre "Good,
> >> > not Evil" clause."
>
> >> > License clause: "The Software shall be used for Good, not Evil."
>
> >> > I'm writing to ask permission to drop this clause from the license. Or
> >> > even better for our users, to put the module under the WebHelpers
> >> > license which is a similar MIT-style license:
>
> >> > ===
> >> > All rights reserved.
>
> >> > Redistribution and use in source and binary forms, with or without
> >> > modification, are permitted provided that the following conditions
> >> > are met:
> >> > 1. Redistributions of source code must retain the above copyright
> >> >    notice, this list of conditions and the following disclaimer.
> >> > 2. Redistributions in binary form must reproduce the above copyright
> >> >    notice, this list of conditions and the following disclaimer in the
> >> >    documentation and/or other materials provided with the distribution.
> >> > 3. The name of the author or contributors may not be used to endorse or
> >> >    promote products derived from this software without specific prior
> >> >    written permission.
>
> >> > THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
> >> > ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
> >> > IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
> >> > PURPOSE
> >> > ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
> >> > FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
> >> > CONSEQUENTIAL
> >> > DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
> >> > OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
> >> > HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 
> >> > STRICT
> >> > LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
> >> > OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
> >> > SUCH DAMAGE.
> >> > ===
>
> >> > If not, I'll have to remove _jsmin.py from WebHelpers, because we want
> >> > it and Pylons in all Linux distributions.
>
> >> > Domen and Pedro--
>
> >> > If _jsmin.py goes, minify.py might have to go too. It has no fallback
> >> > implementation for Javascript compression, and the remaining CSS
> >> > compression functionality might look funny all alone. As in, it would
> >> > raise user questions like, Why can I compress this but not that?" On
> >> > another note, a user has submitted a patch to minify application code
> >> > and external Javascript libraries (e.g., jQuery) together.  Do you
> >> > think this patch looks like a good idea, and would you like to
> >> > incorporate it upstream?
>
> >> >http://groups.google.com/group/pylons-devel/browse_thread/thread/b08e...
>
> --
> Mike Orr <sluggos...@gmail.com>

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-devel" group.
To post to this group, send email to pylons-de...@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-devel?hl=en.

Reply via email to