-
Notifications
You must be signed in to change notification settings - Fork 74
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
Feat: add recommend icon to registry #55
Conversation
main/npm/registry.ts
Outdated
}); | ||
if (recommendedNpmRegistryIndex > -1) { | ||
npmRegistries[recommendedNpmRegistryIndex].recommended = true; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个逻辑感觉写复杂了:
npmRegistries.forEach(item => {
item.recommended = isAliInternal ? item.registry === ALI_NPM_REGISTRY : item.registry === TAOBAO_NPM_REGISTRY;
});
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
另外安装依赖的地方是不是要强制提示下?比如如果要安装 @ali/xxx
的包,但是 registry 不是 ali 源,这时候直接强制替换掉(只是这次安装替换)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个逻辑感觉写复杂了:
npmRegistries.forEach(item => { item.recommended = isAliInternal ? item.registry === ALI_NPM_REGISTRY : item.registry === TAOBAO_NPM_REGISTRY; });
fixed
Closed: #51
方案
预览图:
内网环境:
外网环境: