0.1.2 • Published 7 months ago

@codegenius/hooks-plugin v0.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

@codegenius/hooks-plugin

新增或修改 simple-git-hooks 配置后需要重新初始化, 支持命令模式和 API 模式;

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

安装

npm i @codegenius/hooks-plugin -D
import { defineConfig } from "code-genius";
import { gitInitSimpleHooksInstaller } from "@codegenius/hooks-plugin";

export default defineConfig({
  plugins: [
    gitInitSimpleHooksInstaller(),
  ],
});

使用

命令模式

codeg hooks

API 模式

import { gitInitSimpleHooks } from "@codegenius/hooks-plugin";

(async () => {
  await gitInitSimpleHooks();
})();
0.1.2

7 months ago

0.1.1

8 months ago

0.1.0

8 months ago