sobchenyuk / htmlcompressor

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

Additional script types to be compressed as HTML #72

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
It seems that the script type 'x-jquery-tmpl' won't be used much in the future 
as jQuery tmpl plugin has been abandoned [1] some time ago. It would be good if 
'text/html' and 'text/template' were added to the script type check, as they 
are the two most commonly used alternative types for JS templates.

If you accept patches I'll be able to do this sometime this week.
Thank you.

[1] "The jQuery team has decided not to take this plugin past beta. It is no 
longer being actively developed or maintained." - http://api.jquery.com/tmpl/

Original issue reported on code.google.com by nik...@gmail.com on 20 May 2012 at 11:11

GoogleCodeExporter commented 8 years ago
Thanks for the report. No need to do the patch, I probably would need to 
introduce a new option to compress "text/" scripts as html.

Original comment by serg472@gmail.com on 20 May 2012 at 5:44

GoogleCodeExporter commented 8 years ago
One solution, that would make it simple for common use cases, could be for that 
new option, say '--compress-script', to compress any script tag that has a type 
defined and that type is not any of 'text/javascript', 'text/ecmascript', 
'application/javascript', and 'application/ecmascript'. Other exceptions via 
the config file could be provided but I can't imagine that would be used too 
often.

Original comment by nik...@gmail.com on 21 May 2012 at 1:00