Skip to content

Commit 5419e3f

Browse files
committed
refactor(app): 重构
1 parent 0968a49 commit 5419e3f

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
使用场景: 用于 `simple-git-hooks` 来配置 `git hooks` 的使用, 方便初始化和更新时使用, 混用过 `husky` 的会按其文档进行删除操作.
66

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

928
```bash
@@ -13,7 +32,7 @@ codeg hooks
1332
### API 模式
1433

1534
```typescript
16-
import { gitInitSimpleHooks } from "code-genius";
35+
import { gitInitSimpleHooks } from "@codegenius/hooks-plugin";
1736

1837
(async () => {
1938
await gitInitSimpleHooks();

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)