On Thu, Mar 13, 2008 at 9:50 AM, Chris Chabot <[EMAIL PROTECTED]> wrote:
> I have some experience with most compressors, and so far yuicompressor > is the only one what worked well for everything i've thrown at it > (anything i've tried else went haywire on prototype.js and completely > broke it for instance), plus since it's also used in the java version it > gives me some level of security that it will always work with the > shindig features javascripts. If you look in our pom.xml, you'll see we have to bypass compression for several files because of yuicompressor's buggy output. For some inexplicable reason, it insists on either inserting unnecessary whitespace, or inserting unnecessary semicolons (depending on which flags you set). dojo doesn't have this problem. I've found output sizes to be comparable, though yui's output seems to be slightly smaller after gzipping. In any case, I don't think including a specific compressor in our repo is necessarily the best idea. We should probably recommend yuicompressor since we can "prove" it's safe (notwithstanding the special cases in the pom.xml), but I don't see that it necessitates pulling in their jar. When we finally get to having "releases", we should include both compressed and uncompressed files, and that compression can be done using yuicompressor. As far as PHP based tools go ... their not really worth mentioning > really and do not have sufficient quality to be used here. Hence my > thought to call the yuicompressor from the command line (if configured > too). Yes, on the fly probably isn't ideal in the php code, though some theoretical caja web service could provide this. I'll go ahead with this then, and add a config for its location, and if > set do the (cached) on-the-fly compressing of the javascript files How would you do this on the fly? Invoking yuicompressor, or using something less powerful? > > -- Chris > > On Thu, 2008-03-13 at 09:42 -0700, Kevin Brown wrote: > > > > > > > Ultimately we'll be doing on the fly compression as you've suggested > > in the > > Java case, so it wouldn't be unreasonable to do it for PHP as well. My > > only > > concern here is that, so far as I know, there aren't any decent php > > tools > > that do much more than remove comments and whitespace. If this is > > sufficient > > for you though, use it by all means. I think there's a jsmin port to > > php. > -- ~Kevin

