shonny-ua / gulp-rev-collector

Static asset revision data collector from manifests, with was generated from different streams and replace they's links in html template.
MIT License
149 stars 41 forks source link

replaceReved won't work while a link is end with string such as '.min.js' #18

Closed wzshuang closed 9 years ago

wzshuang commented 9 years ago

It works well first time, but won't replace alredy replaced links.

github github2 github3

shonny-ua commented 9 years ago

You can use 'revSuffix' option to achieve the goal. try:

...
    .pipe( revCollector({
            replaceReved: true,
            revSuffix: '-[0-9a-f]{8,10}-?(\.min)?'
...

I do not remember exactly how 'gulp-rev' handles files with suffix '.min'. Probably, You need to use revSuffix: '(.min)?-[0-9a-f]{8,10}-?'

wzshuang commented 9 years ago

thanks, I'll try it later.