macray / htmlcompressor

Automatically exported from code.google.com/p/htmlcompressor
Apache License 2.0
0 stars 0 forks source link

Version of yuicompressor is hardcoded into Java source #24

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
>> What steps will reproduce the problem?

1. Use htmlcompressor-0.9.7.jar with yuicompressor-2.4.4.jar
2. Set --compress-js or compress-css
3. Run

>> What is the expected output? What do you see instead?

No errors should be reported and Javascript and CSS within the HTML files 
should also be compressed.

Instead, I see an error relating to how the yuicompressor-2.4.2.jar must be in 
the same directory in order for htmlcompressor to find it, regardless of 
version. Also, no HTML was compressed at all, while it might be expected that 
html would be compressed while the --compress-js / css options would simply be 
ignored and HTML compression would continue.

>> Please provide any additional information below.

YUI Compressor 2.4.2 had a serious bug which munged CSS media queries 
(http://yuilibrary.com/projects/yuicompressor/ticket/2527991) and was fixed in 
2.4.4 which is still not up on the Public YUI download page. 

The overview of this project mentions that the filename of yuicompressor cannot 
be configured.

Perhaps scanning the filesystem only in the same directory as htmlcompressor 
and looking for any version of yuicompressor would work better. To workaround, 
I've simply renamed the newer yuicompressor (probably should patch my local src 
with the newer yuicompressor filename).

-----

Thanks, Serg; this compressor is really great!

Original issue reported on code.google.com by mga...@iplantcollaborative.org on 29 Dec 2010 at 1:28

GoogleCodeExporter commented 9 years ago
Class path must be hardcoded and there is no easy workaround as far as I know. 
I added support for yuicompressor-2.4.4.jar in 0.9.8 release by hardcoding it 
as well (so now it searches for both versions).

Original comment by serg472@gmail.com on 30 Dec 2010 at 6:15

GoogleCodeExporter commented 9 years ago
Sweet; thanks much!

Original comment by mga...@iplantcollaborative.org on 3 Jan 2011 at 4:32