Skip to content

Commit

Permalink
feat: update README
Browse files Browse the repository at this point in the history
  • Loading branch information
Hub-yang committed Aug 14, 2024
1 parent 634b700 commit 990f0e4
Showing 1 changed file with 25 additions and 17 deletions.
42 changes: 25 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,41 @@
<h3 align=center>🔥一些帮助简化前端配置工程的通用脚本</h3>
# @huberyyang/todo-scripts

## 开始
<h2 align=center>🔥一些帮助简化前端配置工程的通用脚本</h2>

> [!IMPORTANT]
> ⚠️ 目前模块内使用pnpm,后期新增自动判断
⚠️ 目前模块内使用pnpm,后期新增自动判断
#### 没有pnpm?,执行
```shell [npm]
# 没有pnpm?,执行
npm install pnpm -g
```

## 开始

### 安装

```shell [npm]
npm install --save-dev @huberyyang/todo-scripts
```

```shell [pnpm]
pnpm add --save-dev @huberyyang/todo-scripts
```

```shell [yarn]
yarn add --dev @huberyyang/todo-scripts
```

```shell [bun]
bun add --dev @huberyyang/todo-scripts
```

## > `commitlint config`
<details>
<summary>
🔵 Commitlint config
</summary>

🚀自动执行 [commitlint](https://github.com/conventional-changelog/commitlint) + [husky](https://github.com/typicode/husky) + [lint-staged](https://github.com/lint-staged/lint-staged)安装与配置

### 执行

```shell [npm]
npx hubery commitlint-init
```
Expand All @@ -42,28 +48,30 @@ pnpm exec hubery commitlint-init
bunx hubery commitlint-init
```

## 配置项
### 配置项

`--clear`
🧹清洁执行 - 执行完脚本后卸载模块
> `--clear` 🧹清洁执行 - 执行完脚本后卸载模块
```shell [npm]
# 执行
npx hubery commitlint-init --clear
```

`--czgit`
📦配置[cz-git](https://github.com/Zhengqbbb/cz-git)支持
> `--czgit` 📦配置[cz-git](https://github.com/Zhengqbbb/cz-git)支持
```shell [npm]
# 执行
npx hubery commitlint-init --czgit
```

## 测试一下🎉
### 测试一下🎉
> [!NOTE]
> eslint 会在每次执行commit前自动执行,如需更改commit钩子执行前的命令,可自行修改**package.json****lint-staged**配置
>
```shell
git add .
git commit -m "test commitlint"
# eslint 会在每次执行commit前自动执行,如需更改commit钩子执行前的命令,可自行修改package.json中lint-staged配置
```

## License

[MIT](./LICENSE) License &copy; 2024 [Hubery Yang](https://github.com/Hub-yang)

0 comments on commit 990f0e4

Please sign in to comment.