Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/stale-falcons-grin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"jspsych": patch
---

fix images encoding in dist zip
10 changes: 8 additions & 2 deletions packages/config/gulp.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ export const createCoreDistArchive = () =>
src("packages/plugin-survey/css/survey.css").pipe(rename("/dist/survey.css")),
src("packages/plugin-survey/css/survey.min.css").pipe(rename("/dist/survey.min.css")),

// Examples
src("examples/**/*", { base: "." })
// Examples HTML files
src(["examples/**/*.html"], { base: "." })
// Rewrite script source paths
.pipe(
replace(
Expand All @@ -103,6 +103,12 @@ export const createCoreDistArchive = () =>
)
),

// Examples files other than HTML (e.g. media files)
// Note: `encoding: false` means that the files contents are treated as binary.
// This prevents Gulp from corrupting binary files such as images when it reads them.
// Needed since Gulp v5.
src(["examples/**/*", "!examples/**/*.html"], { base: ".", encoding: false }),

// VERSION.md
file("VERSION.md", getVersionFileContents(), { src: true }),

Expand Down