Open LYlanfeng opened 7 years ago
Can You show me content of manifest file after gulp.dest('./rev')
?
@shonny-ua i find a bug. if i rename a filename to .min.css ,rev will transform to -aaaaaaaaaa.min.css ,that revCollector doesn't work with replaceReved .and i rename to -min.css / -aaaaaaaaaa-min.css it works.
@shonny-ua
@cjd6568358 it was separate bug... It have been fixed. Use version 1.2.2
@shonny-ua The mail was blocked from spam and was not noticed until today
if i rename file doesn't work ,like @cjd6568358 。 and Use version 1.2.2。 Nor does it work。
@LYlanfeng Do you really need to use 2 different files with the same name ??? Use dirReplacements option with attribute as a function to handle this case.
@qiuyuwu What does not work? Probably the option replaceReved does not work as you expected? Use option revSuffix for renamed reved filenames.
Or describe Your situation more detail.
@shonny-ua Sorry, I did not see the document revsuffix, thanks!
let cleanReplacement = path .basename(json[key]) .replace(new RegExp(opts.revSuffix), '') if ( !~[ path.basename(key), _mapExtnames(path.basename(key), opts) ].indexOf(cleanReplacement) ) { isRev = 0 }
when rename the code is error so i comment out it . and it works
@cjd6568358
Give me rev-manifest.json
file content, please.
I have two file ,the path is "/app/test0.js" and "/app/test/test0.js" ,fileanme is identical。but path is not identical。
gulp.task('testmd5',function() { gulp.src(['src/app/**/*.js']) .pipe(rev()) .pipe(gulp.dest('dist/js')) // write rev'd assets to build dir .pipe(rev.manifest()) .pipe(gulp.dest('./rev')) }); gulp.task('rev', function() { gulp.src(['./rev/*.json', './src/app/**/*.html']) .pipe(revCollector({ replaceReved: true })) .pipe(gulp.dest('./dist/app/')); });
run after all the html replace olny one js file。