jsdelivr 不更新 github 次提交
jsdelivr doesn't update github commits
我在 GitHub 中存储了一个 js 文件。
// Define the function before setup() i.e. at the top if defining in same js file
// Call the function under draw()
function pointCoord() {
stroke(255,0,0);
line(mouseX,0, mouseX, height);
line(0,mouseY, width, mouseY);
if (mouseIsPressed){console.log(`x = ${mouseX}, y = ${mouseY}`);}
}
这是它的 jsdelivr link: https://cdn.jsdelivr.net/gh/JaPatGitHub/EduSimulations@main/Tools/x-y-coordinate%20pointer.js
// Define the function before setup() i.e. at the top if defining in same js file
// Call the function under draw()
function pointCoord() {
stroke(255,0,0);
line(mouseX,0, mouseX, height);
line(0,mouseY, width, mouseY);
if (mouseIsPressed){print("x = "+ mouseX+ ", y = "+mouseY);}
}
(如果你很好奇这看起来不像 Vanilla JS 代码..这个文件应该在 p5.js 库下使用)
如您所见,两页的最后一行不同。实际上,jsdelivr 页面没有显示在 GitHub 上用前 2 次提交更新的内容 - 我提交它们已经超过 10 个小时了。
现在如何更新jsdelivr CDN中的代码?
来自关于 GitHub CDN
的 jsDelivr 网站
We use a permanent S3 storage to ensure all files remain available even if GitHub goes down, or a repository or a release is deleted by its author. Files are fetched directly from GitHub only the first time, or when S3 goes down.
使用发布(或其他命名的)分支,然后从 jsDelivr 访问该分支。
我在 GitHub 中存储了一个 js 文件。
// Define the function before setup() i.e. at the top if defining in same js file
// Call the function under draw()
function pointCoord() {
stroke(255,0,0);
line(mouseX,0, mouseX, height);
line(0,mouseY, width, mouseY);
if (mouseIsPressed){console.log(`x = ${mouseX}, y = ${mouseY}`);}
}
这是它的 jsdelivr link: https://cdn.jsdelivr.net/gh/JaPatGitHub/EduSimulations@main/Tools/x-y-coordinate%20pointer.js
// Define the function before setup() i.e. at the top if defining in same js file
// Call the function under draw()
function pointCoord() {
stroke(255,0,0);
line(mouseX,0, mouseX, height);
line(0,mouseY, width, mouseY);
if (mouseIsPressed){print("x = "+ mouseX+ ", y = "+mouseY);}
}
(如果你很好奇这看起来不像 Vanilla JS 代码..这个文件应该在 p5.js 库下使用)
如您所见,两页的最后一行不同。实际上,jsdelivr 页面没有显示在 GitHub 上用前 2 次提交更新的内容 - 我提交它们已经超过 10 个小时了。
现在如何更新jsdelivr CDN中的代码?
来自关于 GitHub CDN
的 jsDelivr 网站We use a permanent S3 storage to ensure all files remain available even if GitHub goes down, or a repository or a release is deleted by its author. Files are fetched directly from GitHub only the first time, or when S3 goes down.
使用发布(或其他命名的)分支,然后从 jsDelivr 访问该分支。