Skip to content

Commit

Permalink
Fix how options are sent to asset SHA'ing
Browse files Browse the repository at this point in the history
  • Loading branch information
tombye committed Jun 30, 2021
1 parent 3313c78 commit 54a10f3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const paths = {
assetsUrl: '/alerts/assets/'
};

const filenameFormat = '{name}-{hash:8}{ext}'
const hashOptions = { format: '{name}-{hash:8}{ext}' }

plugins.sass.compiler = require('sass');

Expand All @@ -43,20 +43,20 @@ const copy = {
images: () => {
return src(paths.govuk_frontend + 'govuk/assets/images/**/*')
.pipe(dest(paths.dist + 'images/'))
.pipe(plugins.hash(filenameFormat))
.pipe(plugins.hash(hashOptions))
.pipe(dest(paths.dist + 'images/'));
}
},
html5shiv: () => {
return src(paths.node_modules + 'html5shiv/dist/*.min.js')
.pipe(dest(paths.dist + 'javascripts/vendor/html5shiv/'))
.pipe(plugins.hash(filenameFormat))
.pipe(plugins.hash(hashOptions))
.pipe(dest(paths.dist + 'javascripts/vendor/html5shiv/'));
},
images: () => {
return src(paths.src + 'images/**/*')
.pipe(dest(paths.dist + 'images/'))
.pipe(plugins.hash(filenameFormat))
.pipe(plugins.hash(hashOptions))
.pipe(dest(paths.dist + 'images/'));
}
};
Expand Down Expand Up @@ -214,7 +214,7 @@ const scss = {
plugins.postcss([require('oldie')()])
))
.pipe(dest(paths.dist + 'stylesheets/'))
.pipe(plugins.hash())
.pipe(plugins.hash(hashOptions))
.pipe(dest(paths.dist + 'stylesheets/'));
}
};
Expand Down

0 comments on commit 54a10f3

Please sign in to comment.