Closed xingxiaoyiyio closed 8 years ago
Ypu can use gulp-rev-collector's dirReplacements option. Like below:
gulp.task('rev', function () {
return gulp.src(['rev/**/*.json', 'templates/**/*.html'])
.pipe( revCollector({
dirReplacements: {
'${url_resources}/css/commQuery/': '/path_to_url_resources/css/commQuery/',
'${url_resources}/js/': '/path_to_url_resources/js/'
}
}) )
.pipe( minifyHTML({
empty:true,
spare:true
}) )
.pipe( gulp.dest('dist') );
});
Can I close Your issue?
Ok !
在 2016年9月19日,下午3:42,Oleksandr Ovcharenko notifications@github.com 写道:
Can I close Your issue?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/shonny-ua/gulp-rev-collector/issues/28#issuecomment-247928671, or mute the thread https://github.com/notifications/unsubscribe-auth/ARE_bkXZwyDR-eq-QmuI61q7TC5DENUEks5qrjzugaJpZM4J-veO.
All my pages are .jsp format, I import static js&css resources like below:
When I use gulp-rev && gulp-rev-collector to add md5(version No.) for these resources, it doesn't work since the path include ${url_resources}, is there any way to set this ${url_resources} template variable?