zoukankan      html  css  js  c++  java
  • 介绍npm fund命令:JavaScript包管理器npm实现捐赠,fund列出捐赠平台及其url

    NPM 公司,JavaScript 包管理器 npm 的维护者。2019年8 月份时,Standard JS在项目中实验性内置广告的事件引发热议,这些广告通过一个名为Funding的npm软件包展示在终端,该软件包包含在Standard的代码库中。之后NPM公司宣布将禁止此类终端广告行为。

      此事件后,NPM表示,它打算在今年年底前为开源开发人员开发一个众筹平台。根据 The Register 报道,它已经在此承诺上迈出了一步。

      本周周二,该公司修改了最新版 npm 6.13.0 的代码,添加了“funding”命令。它的作用是让维护 npm 的开发人员(为Node.js 创建包)声明元数据,为有意愿的捐赠者指明捐赠平台。在 package.json 文件中添加了一个“funding” 字段,这个文件列出了各种模块设置和依赖项。funding 可指向在线捐赠服务的 url,如 Patreon、Open Collective、GitHub Sponsors、License Zero 或者其他支付网站。

      之后,使用这些包的应用程序程序员可运行 npm fund,为指定的包的作者进行捐赠,该命令在用户的默认浏览器中打开指定的捐赠服务链接,以操作信用卡进行捐赠等。下图可以看到,npm ls 与 npm fund 的区别,ls 只列出包名,而 fund 还列出了捐赠平台及其 url。

      

    33 packages are looking for funding
      run `npm fund` for details
    
    
    D:GitHub Projectpay>npm fund
    pay-ts@0.1.0
    +-- core-js@3.6.2, core-js-compat@3.6.2
    | +-- type: opencollective
    | `-- url: https://opencollective.com/core-js
    +-- @babel/core@7.7.7
    | +-- type: opencollective
    | `-- url: https://opencollective.com/babel
    +-- webpack@4.41.5, schema-utils@2.6.1, terser-webpack-plugin@2.3.1, copy-webpack-plugin@5.1.1, css-loader@3.4.1
    | +-- type: opencollective
    | +-- url: https://opencollective.com/webpack
    | `-- glob@7.1.6
    |   `-- url: https://github.com/sponsors/isaacs
    +-- browserslist@4.8.3
    | +-- type: tidelift
    | `-- url: https://tidelift.com/funding/github/npm/browserslist
    +-- has-symbols@1.0.1, resolve@1.14.2, is-date-object@1.0.2, is-symbol@1.0.3, es-to-primitive@1.2.1, is-callable@1.1.5, is-regex@1.0.5, object-inspect@1.7.0, string.prototype.trimleft@2.1.1, string.prototype.trimright@2.1.1, es-abstract@1.17.0, object.values@1.1.1, object.getownpropertydescriptors@2.1.0, object-is@1.0.2, regexp.prototype.flags@1.3.0, deep-equal@1.1.1
    | `-- url: https://github.com/sponsors/ljharb
    +-- p-limit@2.2.2
    | `-- url: https://github.com/sponsors/sindresorhus
    +-- find-cache-dir@3.2.0
    | `-- url: https://github.com/avajs/find-cache-dir?sponsor=1
    +-- picomatch@2.2.1
    | `-- url: https://github.com/sponsors/jonschlinkert
    +-- autoprefixer@9.7.3
    | +-- type: tidelift
    | `-- url: https://tidelift.com/funding/github/npm/autoprefixer
    +-- postcss@7.0.26
    | +-- type: tidelift
    | `-- url: https://tidelift.com/funding/github/npm/postcss
    +-- ansi-styles@4.2.1
    | `-- url: https://github.com/chalk/ansi-styles?sponsor=1
    `-- loglevel@1.6.6
      +-- type: tidelift
      `-- url: https://tidelift.com/subscription/pkg/npm-loglevel?utm_medium=referral&utm_source=npm_fund

      NPM公司的联合创始人和联合首席技术官 Isaac Schlueter在电话采访中说:“在开源领域,资金是一个长期存在的问题,我们正在解决开源项目需要资金的难题,但很少有方法可以让使用的代码的人直观地了解这些信息,这种融资方式就可以做到”。

      Schlueter 认为NPM 公司的融资机制有利有弊,有利的方面是它确实把一些营销技巧从方程式中剔除了出来,开发者只需要设置一个支付URL,然后把它放进“包“里,当该包管理器被安装时就自动出现在列表上。不利的影响是它很可能奖励的是优秀的营销人员,而不是奖励优秀的开发者。

      但当被问及NPM 公司的融资平台是否有助于为NPM本身提供资金时,Schlueter说:

    这是很有可能的,但我也不认为这是一个可增长收入的方式。我想强调的是不要让开源生态系统因为被耗尽而瓦解。

    转载请注明:文章转载自 OSCHINA 社区 [http://www.oschina.net]
    原文标题:npm 实现捐赠,首次为开源代码提供资助

    推荐文章:

    https://blog.meathill.com/tech/npm-add-funding-to-package-json.html

     

    推荐文章:

    【NPM解决方案】npm WARN deprecated core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage  

    Vue工程报错解决方案Warn:import Vue from "vue";  

  • 相关阅读:
    words you learn through youtube and so on in daily life
    python 随笔
    Zookeeper 指南
    Mac 后台服务
    Elasticsearch 指南
    架构之灰度部署
    架构之CDN缓存
    架构之微服务(zookeeper)
    架构之微服务(etcd)
    架构之微服务设计(Nginx + Upsync)
  • 原文地址:https://www.cnblogs.com/guoxinyu/p/npm-fund.html
Copyright © 2011-2022 走看看