funding

中英双语

您可以指定一个包含 URL 的对象,该 URL 提供有关帮助资助包开发的方法的最新信息,或字符串 URL,或以下数组:

{
  "funding": {
    "type" : "individual",
    "url" : "http://example.com/donate"
  },

  "funding": {
    "type" : "patreon",
    "url" : "https://www.patreon.com/my-account"
  },

  "funding": "http://example.com/donate",

  "funding": [
    {
      "type" : "individual",
      "url" : "http://example.com/donate"
    },
    "http://example.com/donateAlso",
    {
      "type" : "patreon",
      "url" : "https://www.patreon.com/my-account"
    }
  ]
}

用户可以使用 npm fund 子命令列出其项目的所有依赖项的 funding URL,直接和间接。提供项目名称时,还可以使用访问每个资助 URL 的快捷方式,例如:npm fund <projectname>(当有多个 URL 时,将访问第一个)