Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
gulp.task('rev', () => {
// gulp-rev-rewrite will mangle binary files (images, etc), so ignore them
const binaryAssetFilter = gulpFilter(
['**', '!**/*.{ico,png,jpg,jpeg,gif,webp}'],
{ restore: true }
);
const htmlFilter = gulpFilter(['**', '!**/*.html'], { restore: true });
return gulp
.src(`**/*.{js,css,html}`, { cwd: dirs.destination })
.pipe(htmlFilter)
.pipe(gulpRev())
.pipe(htmlFilter.restore)
.pipe(binaryAssetFilter)
.pipe(gulpRevRewrite())
.pipe(binaryAssetFilter.restore)
.pipe(gulp.dest(dest))
.pipe(gulpRevDel())
.pipe(gulpRev.manifest())
.pipe(gulp.dest(dest));
});
gulp.task('rev', () => {
// gulp-rev-rewrite will mangle binary files (images, etc), so ignore them
const binaryAssetFilter = gulpFilter(
['**', '!**/*.{ico,png,jpg,jpeg,gif,webp}'],
{ restore: true }
)
const htmlFilter = gulpFilter(['**', '!**/*.html'], { restore: true })
return gulp
.src(`**/*.{js,css,html}`, { cwd: dirs.destination })
.pipe(htmlFilter)
.pipe(gulpRev())
.pipe(htmlFilter.restore)
.pipe(binaryAssetFilter)
.pipe(gulpRevRewrite())
.pipe(binaryAssetFilter.restore)
.pipe(gulp.dest(dest))
.pipe(gulpRevDel())
.pipe(gulpRev.manifest())
.pipe(gulp.dest(dest))
})