-
Notifications
You must be signed in to change notification settings - Fork 2
实现 mirror,添加 help #13
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
Conversation
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.
Pull request overview
This PR implements mirror registry support for the create-koishi CLI tool and adds a help command to display usage information.
Key Changes:
- Adds
--mirror/-moption to allow users to specify a custom npm registry (defaults to npmmirror when used as a flag without value) - Adds
--help/-hoption to display CLI usage information with all available options - Updates the scaffold function to use the specified mirror registry with a fallback chain
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
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.
我感觉这个参数应该是 --registry 而非 --mirror。如果要这么改的话可以把 ref 的 r 去掉,转给 registry。
还有一个地方就是这个 --mirror 为 true 的行为感觉不够明确,建议是这样:
--registry [url]表示指定某个 registry--npmmirror相当于--registry https://registry.npmmirror.com
我也觉得,其实原始需求里其实就是加个 mirror 的 flag,但是又觉得写死不太好。确实拆成两个好点 |
|
这样改如何,去掉了 mirror(反正之前也没有效果 |
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.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
|
|
No description provided.