我在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链接: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 code..this文件应该在p5.js库下使用)
正如您所看到的,两页的最后一行是不同的。实际上,jsdelivr页面没有显示在GitHub上更新的前2次提交的内容--而且我已经提交了10多个小时。
现在,我如何更新jsdelivr中的代码?
发布于 2021-08-27 14:00:49
来自jsDelivr关于GitHub CDN的网站
我们使用永久的S3存储来确保所有文件都是可用的,即使GitHub崩溃了,或者存储库或发行版被作者删除了。文件仅在第一次从GitHub中直接获取,或者在S3下降时直接从获取。
使用发行版(或其他命名的)分支,然后从jsDelivr访问该分支。
https://stackoverflow.com/questions/68954361
复制相似问题