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

[Feature]: 考虑支持 yarn 换源嘛 #28

Closed
NOVIAS opened this issue May 16, 2022 · 5 comments
Closed

[Feature]: 考虑支持 yarn 换源嘛 #28

NOVIAS opened this issue May 16, 2022 · 5 comments
Assignees

Comments

@NOVIAS
Copy link

NOVIAS commented May 16, 2022

Feature request 🚀

Expected:

想问一下有没有关于支持yarn换源的计划.

Examples:

Programme:

Others:

@NOVIAS NOVIAS changed the title 考虑支持 yarn 换源嘛 [Feature]: 考虑支持 yarn 换源嘛 May 16, 2022
@nonzzz
Copy link
Collaborator

nonzzz commented May 17, 2022

对于Yarn来说。Yarn1对于registry是默认兼容的。只需后来者的pnpm 也是一样的。关于这种指定yarnrc 的行为我如果要支持可能就是会多加一个指令define 用来决定改变哪种rc.

@NOVIAS
Copy link
Author

NOVIAS commented May 17, 2022

emmm, 好吧. 谢谢你们的开源, 已star.

@nonzzz
Copy link
Collaborator

nonzzz commented May 17, 2022

@NOVIAS 对应未来的yarn2或者yarn3 等工具我会提供一个define指令。用户可以根据define的内容去设置对应不同包管理的源。因为用户安装node的时候一般会默认附带npm。其实提供define我觉得是合理的。例如

$ grm define yarn

$ grm use yarn

define yarn 以后就告诉了grm 后续的改源设置是发生在.yarnrc上 原本的.npmrc 则不会受影响。因为我觉得同时修改多份源文件是一个很不好的事情。

@nonzzz nonzzz pinned this issue May 17, 2022
@NOVIAS
Copy link
Author

NOVIAS commented May 17, 2022

是的, 这个想法挺好的.
关于以后支持其他管理器的界面, 我有个小建议:
现在的界面是:

	grm ls
 		npm ------------- https://registry.npmjs.org/ 
	 	yarn ----------- https://registry.yarnpkg.com/ 
 		huawei ------- https://repo.huaweicloud.com/repository/npm/ 
 		tencent ----- https://mirrors.cloud.tencent.com/npm/ 
 		cnpm ----------- https://r.cnpmjs.org/ 
		*  taobao ------- https://registry.npmmirror.com/ 
 		npmMirror --- https://skimdb.npmjs.com/Registry/

能不能以后支持 yarn 之后, 改为:

	grm ls
 		npm ------------- https://registry.npmjs.org/ 
	 	yarn ----------- https://registry.yarnpkg.com/ 
 		Y  huawei ------- https://repo.huaweicloud.com/repository/npm/ 
 		tencent ----- https://mirrors.cloud.tencent.com/npm/ 
 		cnpm ----------- https://r.cnpmjs.org/ 
		N  taobao ------- https://registry.npmmirror.com/ 
 		npmMirror --- https://skimdb.npmjs.com/Registry/

N 代表 npm, y 代表 yarn

更好区分一些.

@nonzzz
Copy link
Collaborator

nonzzz commented May 17, 2022

@NOVIAS 后面会做成table的模式

@nonzzz nonzzz self-assigned this May 17, 2022
@nonzzz nonzzz closed this as completed Sep 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants