Closed GoogleCodeExporter closed 9 years ago
Original comment by rgr...@gmail.com
on 28 Aug 2007 at 5:06
not quite sure why it is invalid. it's a perfectly valid point. a better
alternative to jsmin and the pre mentioned
script is http://joliclic.free.fr/php/javascript-packer/en/
Original comment by bugged...@gmail.com
on 28 Aug 2007 at 9:15
JSMin doesn't "bail" on large libraries. The problem you're seeing is that
Prototype,
Scriptaculous, and some other libraries are written with bad coding practices
that
JSMin doesn't tolerate. The rule of thumb is that if JSLint throws warnings,
you're
likely to run into problems with JSMin.
Packer is a reasonable alternative to JSMin, but whether or not it's better is
arguable. They both have their advantages and disadvantages.
I'd advise against using your regexp-based minification function. JavaScript is
a
notoriously difficult language to parse correctly, and those regexps are
absolutely
guaranteed to introduce errors (especially the 'remove extra spaces' regexp,
which
doesn't take strings into account).
Original comment by rgr...@gmail.com
on 28 Aug 2007 at 9:23
I believe I read someone now maintains JSMin-friendly versions of these
libraries
(or you can get pre-minified versions). Regardless, in version 2.x you can use
the
PHP5 Packer (or any other code) for certain files if you want. The
configuration is
a little tricky, but ask on the google groups.
Original comment by mrclay....@gmail.com
on 27 Nov 2008 at 3:37
Original issue reported on code.google.com by
bugged...@gmail.com
on 28 Aug 2007 at 4:39