【发布时间】:2021-10-27 10:47:29
【问题描述】:
我有一个js文件存储在这里GitHub。
// 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 链接: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 中的代码?
【问题讨论】:
标签: javascript github commit cdn