Skip to content

Commit

Permalink
remove version of woff2 file
Browse files Browse the repository at this point in the history
  • Loading branch information
mayswind committed Aug 20, 2019
1 parent 26ecb10 commit d34aa1e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ gulp.task('prepare-html', ['prepare-styles', 'prepare-scripts', 'prepare-views']
.pipe($.if('css/*.css', $.replace(/\/\*# sourceMappingURL=.* \*\/$/g, '')))
.pipe($.if(['js/moment-with-locales-*.min.js', 'js/plugins.min.js', 'js/aria-ng.min.js'], $.uglify({output: {comments: saveLicense}})))
.pipe($.if(['css/plugins.min.css', 'css/aria-ng.min.css'], $.cssnano({safe: true, autoprefixer: false})))
.pipe($.replace(/url\((\.\.\/fonts\/[a-zA-Z0-9\-]+\.woff2)(\?[a-zA-Z0-9\-_=.]+)?\)/g, function(match, fileName) {
return 'url(' + fileName + ')'; // remove version of woff2 file (woff2 file should be cached via application cache)
}))
.pipe($.if(['js/plugins.min.js', 'js/aria-ng.min.js', 'css/plugins.min.css', 'css/aria-ng.min.css'], $.rev()))
.pipe($.if('*.html', $.htmlmin({collapseWhitespace: true})))
.pipe($.revReplace())
Expand Down

0 comments on commit d34aa1e

Please sign in to comment.