Open Francisc opened 8 years ago
I ended up achieving this with gulp-filter.
// Filter out HTML files, only assets are passed through
const assetFilter = filter(['**', '!**/*.html'], { restore: true });
gulp.src('**') // Grab everything
.pipe(assetFilter) // Filter out HTML files
.pipe(rev()) // gulp-rev
.pipe(assetFilter.restore) // Undo the filter, so we have everything again
.pipe(revReplace()) // Replace filenames
.pipe(gulp.dest(DIST_FOLDER));
Hi,
Is it possible to use
rev-replace
on the same stream asrev
withoutuseref
?Doing this fails:
Because
index.html
isn't inASSETS_GLOB
.Adding it to
ASSETS_GLOB
will makerev-replace
revision the HTML file as well, so also bad.