Skip to content

Commit a615402

Browse files
authored
Merge pull request #3459 from davepagurek/jsdelivr
Use jsdelivr as a CDN to fix broken links
2 parents a3eb021 + 94ed2c3 commit a615402

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

client/modules/IDE/hooks/useP5Version.jsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ export const p5Versions = [
136136
'0.2.1'
137137
];
138138

139-
export const currentP5Version = '1.11.3'; // Don't update to 2.x until 2026
139+
export const currentP5Version = '1.11.5'; // Don't update to 2.x until 2026
140140

141141
export const p5SoundURLOld = `https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.11.3/addons/p5.sound.min.js`;
142142
export const p5SoundURL =
@@ -147,7 +147,7 @@ export const p5ShapesAddonURL =
147147
'https://cdn.jsdelivr.net/npm/p5.js-compatibility@0.1.2/src/shapes.js';
148148
export const p5DataAddonURL =
149149
'https://cdn.jsdelivr.net/npm/p5.js-compatibility@0.1.2/src/data.js';
150-
export const p5URL = `https://cdnjs.cloudflare.com/ajax/libs/p5.js/${currentP5Version}/p5.js`;
150+
export const p5URL = `https://cdn.jsdelivr.net/npm/p5@${currentP5Version}/lib/p5.js`;
151151

152152
const P5VersionContext = React.createContext({});
153153

server/domain-objects/createDefaultFiles.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function draw() {
99
export const defaultHTML = `<!DOCTYPE html>
1010
<html lang="en">
1111
<head>
12-
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.11.3/p5.js"></script>
12+
<script src="https://cdn.jsdelivr.net/npm/p5@1.11.5/lib/p5.js"></script>
1313
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.11.3/addons/p5.sound.min.js"></script>
1414
<link rel="stylesheet" type="text/css" href="style.css">
1515
<meta charset="utf-8" />

0 commit comments

Comments
 (0)