Azure Devops神器:禁用从上游源保存程序包 [英] Azure Devops Artifacts: disable saving packages from upstream sources
问题描述
我有一个npm包的提要,其中npmjs设置为上游源(默认情况下).当您尝试安装具有其他依赖项的上载自定义软件包时,这些依赖项软件包会自动保存在Feed中,以节省以后的安装时间.但是,我不希望它,并且希望我的Feed仅托管我自己的软件包,并且每次安装时都从上游源下载.有办法吗?
I have a feed for npm packages with npmjs set as upstream source (by default). When you try to install your uploaded custom package with other dependencies, those dependency packages get saved automatically in your feed to save time for future installs. I however do not want it and want my feed to only host my own packages and just download from the upstream source every time an install is made. Is there a way to do this?
推荐答案
我要做的是将我们所有的程序包都放在一个作用域中,并修改npmrc文件以仅在该作用域中使用azure feed,因此其余的程序包仍然从registry.npmjs.org下载
What I did instead is make all our packages in a scope and modify the npmrc file to use the azure feed for only that scope so the rest of the packages still gets downloaded from registry.npmjs.org
.npmrc文件如下所示
here's what the .npmrc file would look like
registry=https://registry.npmjs.org/
@customScope:registry=https://ourregistry.org/ourfeed
always-auth=true
这篇关于Azure Devops神器:禁用从上游源保存程序包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!