gulp-useref icon indicating copy to clipboard operation
gulp-useref copied to clipboard

Breaks image/binary files

Open mix3d opened this issue 9 years ago • 1 comments

I'm not sure if this is bug-worthy or not, but it took me forever to find out why all my image files were getting borked; it turns out it was useref.

Because I am also using gulp-rev-all to version files after useref generates them, I needed all the files for the entire web-app in the same filestream. Following the examples, I blindly piped everything through useref.

At a minumum the docs could be updated to mention this, and maybe add an example of lots of files and using gulp-if or gulp-filter to get just the html files for the useref pipe?

Regardless, useref shouldn't be editing a file if it doesn't find the correct keys, right? Is there a way to discern that it is a binary, not a text file, and ignore it? (Still new to node.js and gulp)

mix3d avatar Mar 03 '16 04:03 mix3d

I don't see this as a huge problem that needs solving. This is the first time I've ever had this complaint. I do think additional docs could help though, like a recipe section or an examples section.

jonkemp avatar Apr 13 '16 20:04 jonkemp