Skip to content

Commit

Permalink
Fix copying of binary files during asset build
Browse files Browse the repository at this point in the history
This fixes another instance of the issue identified in
hypothesis/client#6527.

Fixes #8952
  • Loading branch information
robertknight committed Sep 14, 2024
1 parent d299bd6 commit 283840c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ const fontFiles = 'h/static/styles/vendor/fonts/h.woff';

gulp.task('build-fonts', () => {
const fontsDir = 'build/fonts';
return gulp.src(fontFiles).pipe(changed(fontsDir)).pipe(gulp.dest(fontsDir));
return gulp
.src(fontFiles, { encoding: false })
.pipe(changed(fontsDir))
.pipe(gulp.dest(fontsDir));
});

gulp.task('watch-fonts', () => {
Expand Down Expand Up @@ -75,7 +78,7 @@ gulp.task('build-images', () => {

const imagesDir = 'build/images';
return gulp
.src(imageFiles)
.src(imageFiles, { encoding: false })
.pipe(changed(imagesDir))
.pipe(gulpIf(shouldMinifySVG, svgmin(svgminConfig)))
.pipe(gulp.dest(imagesDir));
Expand Down

0 comments on commit 283840c

Please # to comment.