Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何添加 @scope:<registry>? #37

Closed
fritx opened this issue May 17, 2018 · 3 comments
Closed

如何添加 @scope:<registry>? #37

fritx opened this issue May 17, 2018 · 3 comments

Comments

@fritx
Copy link

fritx commented May 17, 2018

# ~/.npmrc
@dxx:registry=https://cnpm.xxx.com:8888
registry=https://registry.npm.taobao.org/
@baixiaoji
Copy link

try

nrm add @dxx https://cnpm.xxx.com:8888

@fritx
Copy link
Author

fritx commented Jun 17, 2020

@baixiaoji 好像还是做不到,添加后,use @dxx,只能做到

registry=https://cnpm.xxx.com:8888/

而我希望的是只有@dxx的scope走这个,其他的走默认

@baixiaoji
Copy link

@baixiaoji 好像还是做不到,添加后,use @dxx,只能做到

registry=https://cnpm.xxx.com:8888/

而我希望的是只有@dxx的scope走这个,其他的走默认

这个可能你需要自己去写后续分流的处理逻辑了,nrm的目的只是帮你管理registry的作用。但是我理解中你是自己搭建了一个cnpm。你使用nrm设置里全局的register为你的@scope 的cnpm地址,如有有@scope就找到了,但是没有的话cnpm会有溯源机制,去找到npm的那里的。而这一块你需要查查cnpm文档有没有对应的设置。
image

@i5ting i5ting closed this as completed Sep 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants