Closed dciccale closed 9 years ago
i made workaround:
dirReplacements: {
// 'assets/images': 'http://my.cdn.net/'
'/': function (file) {
return file.replace(/assets\/images\//, 'http://my.cdn.net/');
}
}
however would be cool just using the dirReplacements
mappping
dirReplacements works "outside" to rev-manifest patterns.
If You have next rev-manifest.json:
{
"avatar.png": "avatar-616d026e5f.png"
}
next revCollector option
dirReplacements: {
'/assets/images/': 'http://my.cdn.net/'
}
will work correctly.
For other cases using function as value of dirReplacements object was added.
rev-manifest.json
gulpfile.js
dist/server/views/index.jade
it doesn't get replaced.
desired output:
i am not sure i am using
dirReplacements
correctly.what i don't see clear is why you are concatenating the replacement string with the pattern at line 93 https://github.com/shonny-ua/gulp-rev-collector/blob/master/index.js#L93
that makes the
regexp
to be/assets\/images\/assets\/images\/avatar\.png/g