Closed benmurden closed 9 years ago
I seem to be having the same issue. Did you happen to find a fix @TigerDX ?
@marcellscarlett, I think the expectation with most build processes that make changes is that you will have a separate source and destination, so you aren't constantly overwriting changes on a single file. With that in mind, I modified the example slightly to work with a source html file instead.
gulp.task("revreplace", ["revision"], function(){
var manifest = gulp.src("./" + opt.distFolder + "/rev-manifest.json");
// Read from a source that remains unchanged, so the replacement values can always be found.
return gulp.src(opt.srcFolder + "/index.html")
.pipe(revReplace({manifest: manifest}))
.pipe(gulp.dest(opt.distFolder));
});
It isn't quite the same, but with some changes to workflow, it was enough to solve my particular use case.
Closing due to merging #34
It seems the example given in the readme only works once, because the reference in the file changes, and can no longer be found on subsequent updates of the manifest.
It might be possible to look for old revision references using some regex, but not sure if this would be the best approach if the revision scheme can be changed.
Any ideas on how to resolve in-place revision replacement, or whether this should be an update?