Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gulp-rev-replace not replacing .min.js file reference in html file #55

Closed
asimnzr opened this issue Feb 24, 2016 · 1 comment
Closed

Comments

@asimnzr
Copy link

asimnzr commented Feb 24, 2016

Hi,

I am working on updating minified file references in html files but the replacement part is not working - although min file and manifest file generation is working fine along with html page copy to output directory.

I am working with gulp-rev-replace without gulp-useref and using the same code provided in ReadMe:

`var rev = require("gulp-rev");
var revReplace = require("gulp-rev-replace");
gulp.task("revision", ["dist:css", "dist:js"], function(){
return gulp.src(["dist//*.css", "dist//*.js"])
.pipe(rev())
.pipe(gulp.dest(opt.distFolder))
.pipe(rev.manifest())
.pipe(gulp.dest(opt.distFolder))
})

gulp.task("revreplace", ["revision"], function(){
var manifest = gulp.src("./" + opt.distFolder + "/rev-manifest.json");

return gulp.src(opt.srcFolder + "/index.html")
.pipe(revReplace({manifest: manifest}))
.pipe(gulp.dest(opt.distFolder));
});`

Here is the snapshot showing the output of the process where min file name is not replaced in the html page:
rev-replace issue

Any help?

@asimnzr asimnzr changed the title rev-replace not replacing .min.js file reference in html file gulp-rev-replace not replacing .min.js file reference in html file Feb 25, 2016
@asimnzr asimnzr closed this as completed Feb 25, 2016
@mshick
Copy link

mshick commented Mar 4, 2016

@asimnzr I have exactly the same problem. If this is an obvious user error a note would be helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants