shkuznetsov / gulp-minify-inline

gulp plugin that minifies inline JS and CSS
MIT License
28 stars 5 forks source link

Anyway to ignore script tags masquerading as templates? #1

Closed jeremyosborne closed 10 years ago

jeremyosborne commented 10 years ago

tl;dr Am curious if you have a way of ignoring script tags that aren't really script tags?

tl; The problem in one of my files is that it is demo code and while I would normally pre-process the templates, it's easier to leave the template in the file (see the example of the handlebar templates here: http://handlebarsjs.com/

Cut and paste the script tag that's not really a script tag:

<script id="entry-template" type="text/x-handlebars-template">
  template content
</script>

The script tags in my file are pretty much like this (bit different) but they are being passed to uglify JS and they are being processed, and the error breaks the build.

shkuznetsov commented 10 years ago

Hello Jeremy,

Thanks for the report, I'll have a look at it tomorrow.

Alexander

shkuznetsov commented 10 years ago

Merged proposed solution in.