Skip to content

Commit cebb255

Browse files
committed
refactor(app): 重构
1 parent 76ca0a6 commit cebb255

File tree

7 files changed

+341
-30
lines changed

7 files changed

+341
-30
lines changed

README.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,25 @@
44

55
使用场景: 用于没有安装其他插件且对于切换命令地址不熟悉的情况下切换常见的镜像地址.
66

7+
## 安装
8+
9+
```bash
10+
npm i @codegenius/registry-plugin -D
11+
```
12+
13+
```javascript
14+
import { defineConfig } from "code-genius";
15+
import { npmRegistryInstaller } from "@codegenius/registry-plugin";
16+
17+
export default defineConfig({
18+
plugins: [
19+
npmRegistryInstaller(),
20+
],
21+
});
22+
```
23+
24+
## 使用
25+
726
### 命令模式
827

928
```bash
@@ -32,7 +51,7 @@ codeg registry --ask
3251
仅对 `npm config set registry xxx` 包装, 无其它配置.
3352

3453
```typescript
35-
import { npmRegistry } from "code-genius";
54+
import { npmRegistry } from "@codegenius/registry-plugin";
3655

3756
(async () => {
3857
await npmRegistry("https://registry.npmjs.org/");

codeg.config.mjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { defineConfig } from "code-genius";
2+
import { gitInitSimpleHooksInstaller } from "@codegenius/hooks-plugin";
3+
4+
export default defineConfig({
5+
plugins: [
6+
gitInitSimpleHooksInstaller(),
7+
],
8+
});

0 commit comments

Comments
 (0)