jamesknelson / gulp-rev-replace

Rewrite occurences of filenames which have been renamed by gulp-rev
MIT License
389 stars 62 forks source link

Replace all occurrences of filename #6

Closed hkeide closed 10 years ago

hkeide commented 10 years ago

Replace all occurrences of filename, not just the first one.

The approach used is faster than using regexp and safe against filenames containing regexp meta characters.

Run this in Chrome to see a performance comparison

nadavsr commented 10 years ago

+1, we are hitting this issue. In our use case, we refer to the revved CSS twice. The first occurrence gets the CDN prefix later down the stream, while the second occurrence is meant only for IE8 and does not get the CDN prefix. Currently, only the first occurrence is revved-replaced.

jamesknelson commented 10 years ago

I've merged #4's tests with your global replace, so this should all work now. Thanks!