buunguyen / combres

ASP.NET and MVC performance optimization library ⛺
Other
123 stars 36 forks source link

Update to use later/latest version of YUICompressor.NET #22

Closed dove closed 9 years ago

dove commented 11 years ago

There have been improvements made to YUICompressor.NET and it boasts to almost match the Java version with the latest release.

Taking a look at Combres code there would be some implications. I'd have a go at making those changes but would like to get some feel on at least the first of the considerations below

  1. Remove strong naming as YUICompressor.NET did so after version 1.7. This would also make future upgrades much easier (without having to compile YUI each time). There seems to be a twitter consensus that strong naming is losing favour, note a question from YUICompressor author: http://stackoverflow.com/questions/19215186/should-i-strongname-strong-sign-an-oss-dll
  2. The Compressor calls have been changed from being constructor passed to property setting. Not major but the Css compressor no longer has a ColumnWidth property and now has a LineBreakPosition property. Is this note worthy? Should something be done with it?
  3. Some configuration changes might have to be made for this as well, have not taken the debugging any further until I hear back.
buunguyen commented 11 years ago
  1. I'd prefer Combres to still be signed, so that both weakly & strongly named assemblies can use it. It's unfortunate that YUICompressor.NET isn't signed any longer; bad move from their end, now everyone who needs a trust chain will have to recompile the lib themselves.
  2. Shouldn't be a problem. YuiCssMinifier and YuiJSMinifier just performs direct call to the underlying YUI compressors, so just make changes in these 2 classes.
  3. Certainly, if there are more/fewer properties, then you only have to update YuiCssMinifier and YuiJSMinifier accordingly. Properties of these classes (in fact, any minifier/filter) are automatically bound to parameters declared in the Combres XML config. Therefore, everything should just work. However, you have to update the documentation in Build/combres/content/App_Data/combres_full_with_annotation.xml so that people aware of the changes.
buunguyen commented 9 years ago

I've pushed 2.3.0.4 which supports latest version of YUICompressor.