We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 39757d8 commit 7e13ec3Copy full SHA for 7e13ec3
README.md
@@ -1 +1,40 @@
1
-# @codegenius/registry-plugin
+# @codegenius/registry-plugin
2
+
3
+切换 **NPM** 镜像地址, 支持命令模式, 询问模式和 API 模式;
4
5
+使用场景: 用于没有安装其他插件且对于切换命令地址不熟悉的情况下切换常见的镜像地址.
6
7
+### 命令模式
8
9
+```bash
10
+# 设置 npm 官方源
11
+codeg registry -u https://registry.npmjs.org/
12
+```
13
14
+| 选项 | 描述 |
15
+| --------- | ------------ |
16
+| -a, --ask | 启用询问模式 |
17
18
+### 询问模式
19
20
21
+# 启动询问模式
22
+codeg registry --ask
23
24
25
26
+# 询问过程
27
+1. 请选择 NPM 镜像
28
29
30
+### API 模式
31
32
+仅对 `npm config set registry xxx` 包装, 无其它配置.
33
34
+```typescript
35
+import { npmRegistry } from "code-genius";
36
37
+(async () => {
38
+ await npmRegistry("https://registry.npmjs.org/");
39
+})();
40
0 commit comments