gulp-replace only relevant files
Piping to gulp.dest
would re-write all input files.
This checks for the pattern first and only passes along files that actually need to be processed,
avoiding unnecessary overwriting with the same content. A benefit is that your files' timestamps stay meaningful.
A more generic solution would be better
Maybe something like:
Or using gulp-snapshot