From a66882b518c03bf80703d72b1cc12e75514ab485 Mon Sep 17 00:00:00 2001 From: Frankie Roberto Date: Tue, 10 Sep 2024 16:07:01 +0100 Subject: [PATCH] Fix encoding issue introduce in gulp v5.0 (#1013) Fix encoding issue introduce in gulp v5.0 Co-authored-by: Adam Chrimes --- CHANGELOG.md | 1 + gulpfile.js | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f1f29533..c2243a727 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ - Change "Contact us" in the footer link examples to "Give us feedback" ([PR 972](https://github.com/nhsuk/nhsuk-frontend/pull/972)) - Adjusted default spacing of back link component ([PR 964](https://github.com/nhsuk/nhsuk-frontend/pull/964)) - Reduce main wrapper padding on mobile ([PR 1003](https://github.com/nhsuk/nhsuk-frontend/pull/1003)) +- Fix image encoding issue introduced in Gulp v5.0 ([PR 1013](https://github.com/nhsuk/nhsuk-frontend/pull/1013)) ## 8.3.0 - 24 July 2024 diff --git a/gulpfile.js b/gulpfile.js index 66fd8890f..7569ffefe 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -125,7 +125,7 @@ function versionJS() { * Copy assets such as icons and images into the distribution */ function assets() { - return gulp.src('packages/assets/**').pipe(gulp.dest('dist/assets/')) + return gulp.src('packages/assets/**', { encoding: false }).pipe(gulp.dest('dist/assets/')) } /** @@ -145,7 +145,10 @@ function cssFolder() { function createZip() { return gulp - .src(['dist/css/*.min.css', 'dist/js/*.min.js', 'dist/assets/**', '!dist/js/nhsuk.min.js'], { base: 'dist' }) + .src(['dist/css/*.min.css', 'dist/js/*.min.js', 'dist/assets/**', '!dist/js/nhsuk.min.js'], { + base: 'dist', + encoding: false + }) .pipe(zip(`nhsuk-frontend-${version}.zip`)) .pipe(gulp.dest('dist')) }