jonkemp / jonkemp/gulp-useref

Breaks image/binary files

Open
#187 1 comment 2 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
700
Forks
89
PR merge metrics
No merged PRs in 30d

Description

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)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.