【问题标题】:jsdelivr doesn't update github commitsjsdelivr 不更新 github 提交
【发布时间】: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


    【解决方案1】:

    来自jsDelivr关于GitHub CDN的网站

    我们使用永久 S3 存储来确保所有文件仍然可用,即使 GitHub 出现故障,或者存储库或发布被其作者删除。 仅在第一次或 S3 出现故障时直接从 GitHub 获取文件

    使用发布(或其他命名)分支,然后从 jsDelivr 访问该分支。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-11-13
      • 2019-07-31
      • 1970-01-01
      • 1970-01-01
      • 2016-02-14
      • 2017-08-30
      相关资源
      最近更新 更多