gulp-html-replace icon indicating copy to clipboard operation
gulp-html-replace copied to clipboard

Check if input file is HTML?

Open KidScripty opened this issue 8 years ago • 2 comments

Not as much of an issue as a feature request but can it check if the file is html and not attempt the operation if not.

KidScripty avatar Aug 10 '16 11:08 KidScripty

You would just apply your own filter gulp-if for example:

.pipe(gulpif(function (file) { 
    return !/.html$/.test(file.path); 
}, htmlreplace({ 
    ... your options
})))

jtuskan avatar Sep 08 '16 12:09 jtuskan

This should be an option, not a default, if implemented. There are reasons to use this with non-HTML files, despite the name.

localpcguy avatar Sep 13 '16 21:09 localpcguy