h5bp / ant-build-script

Ant build script intended for use with HTML5 Boilerplate. You may find something useful here, but this project is archived.
MIT License
986 stars 203 forks source link

Added HtmlCompressor preserve option #144

Closed tommyvernieri closed 10 years ago

tommyvernieri commented 11 years ago

Added a project property specifically for the HtmlCompressor --preserve argument. Specifying the preserve argument here allows the preserve file path to be relative to the base directory; otherwise, specifying a preserve option in tool.htmlcompressor.opts.extra would require a path relative to the JVM.

tommyvernieri commented 11 years ago

I don't have any experience writing Ant projects, so please critique my approach if there is a more "Ant way" to do the property manipulation logic.

I'm using this new option in all three HtmlCompressor targets (-htmlclean, -htmlbuildkit, and -htmlcompress). I notice that tool.htmlcompressor.opts.extra is used in -htmlclean (called via text and build), but is not used in the other two HTML targets (called via buildkit and minify).

Should the new opts.preserve property only be in -htmlclean as well? Maybe the existing opts.extra property should be used in all three HTML targets instead?

roblarsen commented 11 years ago

I left a comment on the PR can you fix it up and add those changes to the PR?

tommyvernieri commented 11 years ago

Disregard that comment, above. I think that in b7d3f64364f45bab9354537ea0ef3991edb1c370, I figured out how you wanted me to use ${dir.build}.

tommyvernieri commented 11 years ago

@roblarsen These three commits should be ready to go. Let me know if you see anything else you'd like changed.

roblarsen commented 11 years ago

I'll test this today or tomorrow!

Thanks for your PR and patience :)

roblarsen commented 10 years ago

merged into 1.1.0