On Thu, Mar 13, 2008 at 6:13 AM, Chris Chabot <[EMAIL PROTECTED]> wrote:
> The java maven build system includes the yuicompressor-maven-plugin to > create minified javascripts to use in the gadget's content, however the > PHP version doesn't have a build system in which i could mirror this > behavior, however i would like to also be able to serve minified > javascript files (on +/- 80k javascript it could make a noticeable > difference). > > The options i see at the moment to do this are: > - Create a shell script that creates minified javascript files > (presumable inside of the features tree), this doesn't sound very > elegant and like it would lead to problems in the future though. > - Minify them on the fly as they are used for the first time, and store > them in the data case, this feels like the best option to me. 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. That would mean to have this working out of the box, i would have to > include a working yuicompressor.jar in shindig, now yuicompressor is > licensed under the BSD license so that should allow for inclusion in the > tree, besides i do believe also having seen jQuery in there which is > dual licensed under the MIT and GPL license (presumably in this case > were counting on its MIT license, which is for all intents and purposes > identical to yuicompressor's license). > > So what do you guys think, would it be ok to include the yuicompressor > in the repo? I don't think including it in our repo is necessarily a requirement -- a link to where to get it might be sufficient. We should always leave people with the option of doing compression however they like. yuicompressor is being used currently by our java code simply because there was a maven depot that had it. If a compressor is included, the question probably needs to go back to ASF people that know more about licensing than I do.

