DenVdmj / htmlcompressor

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

Add support for jQuery template compression #45

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I use jQuery templating and the recommendation is to wrap the template within 
script tags of type "text/x-jquery-tmpl".

htmlcompressor - rightly - leaves such script blocks uncompressed but, since 
the templates are well-formed HTML, they could be compressed if only there were 
a way to instruct htmlcompressor not to avoid them.

I appreciate that this is possible using the existing API but I'm not much of a 
Java developer :-)

Perhaps a flag --compress-jquery-script-template?

Thanks for providing a useful tool!

Original issue reported on code.google.com by daz.wil...@gmail.com on 16 Jul 2011 at 2:26

GoogleCodeExporter commented 8 years ago

Original comment by serg472@gmail.com on 16 Jul 2011 at 5:12

GoogleCodeExporter commented 8 years ago
Added in 1.4.1 release.

Script tags with "text/x-jquery-tmpl" type are not preserved anymore. If it is 
not a desired behavior, you can always wrap any block with <!-- {{{ --> ... 
<!-- }}} --> to preserve it.

Thanks.

Original comment by serg472@gmail.com on 30 Jul 2011 at 4:56

GoogleCodeExporter commented 8 years ago
Thank you! Tried it quickly on some of my content and it worked perfectly.

Original comment by daz.wil...@gmail.com on 31 Jul 2011 at 1:35