Skip to content
This repository has been archived by the owner on Apr 5, 2024. It is now read-only.

Latest commit

 

History

History
32 lines (25 loc) · 807 Bytes

disable-specific-revisioning.md

File metadata and controls

32 lines (25 loc) · 807 Bytes

English / 日本語

Disable asset revisioning to specific files

You can specify the target of revisioning. Modify gulp.src() in the filerev task.

Example 1: Apply only CSS/JS files

gulp.task('filerev', function () {
- return gulp.src('dist/**/*.{css,js,png,jpg,gif,eot,svg,ttf,woff,woff2}')
+ return gulp.src('dist/**/*.{css,js}')
  ...
});

Example 2: Disable revisioning to images under images/static directory.

gulp.task('filerev', function () {
- return gulp.src('dist/**/*.{css,js,png,jpg,gif,eot,svg,ttf,woff,woff2}')
+ return gulp.src([
+   'dist/**/*.{css,js,png,jpg,gif,eot,svg,ttf,woff,woff2}',
+   '!dist/images/static/**'
+ ])
  ...
});

See also