Open xiaoshuimao opened 8 years ago
md5.json
a.js: a-abcdefg.js
This covers the original file
return gulp.src('**/*.php') .pipe(revReplace({ manifest: manifest, replaceInExtensions: ['.php', '.jsp'] })) .pipe(gulp.dest('./')); // This covers the original file
After replacement,
index.php
<script src="a-abcdefg.js"></script>
ok, this is no problem.but i change the md5.json like this:
a.js: a-xxxxx.js
Not replaced, because md5.json has not 'a-abcdefg.js' in the ‘key’。
One way is to retain the original file
return gulp.src('**/*.php') .pipe(revReplace({ manifest: manifest, replaceInExtensions: ['.php', '.jsp'] })) .pipe(gulp.dest('./build')); // retain the original file, output different directory
If I want to cover the original file, Is there a way to solve it or path matching rules under which files?
md5.json
This covers the original file
After replacement,
index.php
ok, this is no problem.but i change the md5.json like this:
md5.json
After replacement,
index.php
Not replaced, because md5.json has not 'a-abcdefg.js' in the ‘key’。
One way is to retain the original file
If I want to cover the original file, Is there a way to solve it or path matching rules under which files?