Skip to content

Commit

Permalink
Use jsdelivr
Browse files Browse the repository at this point in the history
  • Loading branch information
davepagurek committed Sep 28, 2024
1 parent 19e67fd commit a2bf884
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/globals/globals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const sketchesPerPage = 12 as const;
export const eventsPerPage = 12 as const;

export const cdnLibraryUrl =
`https://cdnjs.cloudflare.com/ajax/libs/p5.js/${p5Version}/p5.min.js` as const;
`https://cdn.jsdelivr.net/npm/p5@${p5Version}/lib/p5.min.js` as const;
export const fullDownloadUrl =
`https://github.com/processing/p5.js/releases/download/v${p5Version}/p5.zip` as const;
export const libraryDownloadUrl =
Expand Down
5 changes: 5 additions & 0 deletions test/mocks/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ const handlers = [
readFileSync("./assets/p5.min.js", { encoding: "utf-8" }),
);
}),
http.get("https://cdn.jsdelivr.net/npm/p5*", () => {
return HttpResponse.text(
readFileSync("./assets/p5.min.js", { encoding: "utf-8" }),
);
}),
];

/**
Expand Down

0 comments on commit a2bf884

Please sign in to comment.