如何在 npm 中屏蔽广告? [英] How do I block advertising in npm?
本文介绍了如何在 npm 中屏蔽广告?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我运行各种 npm 命令时,控制台输出充满了各种项目和人员的广告.我是一个多产的开源贡献者,但工具的控制台输出不是广告的好地方.
When I run various npm commands, the console output is filled with ads for various projects and people. I'm a prolific open source contributor, but console output for a tool is not a good place for advertising.
Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
> https://opencollective.com/core-js
> https://www.patreon.com/zloirock
Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
...
...
Thank you for using husky!
If you rely on this package, please consider supporting our open collective:
> https://opencollective.com/husky/donate
当我查找警告或错误时,大约有 11 行输出,着色以引起我的注意.
That's around 11 lines of output, colorised to grab my attention, when I'm looking for warnings or errors.
如何在 npm 中屏蔽广告?
推荐答案
您可以 通过添加环境变量使用 funding
包 删除广告:
You can remove ads using the funding
package by adding an environment variable:
OPEN_SOURCE_CONTRIBUTOR=true
某些使用 opencollective-postinstall 的软件包需要自己的命令:
Some packages that use opencollective-postinstall need their own command instead:
DISABLE_OPENCOLLECTIVE=true
这篇关于如何在 npm 中屏蔽广告?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文