Skip to content

Commit cef16f3

Browse files
xihalejinzhongjia
authored andcommitted
docs(contribution): more information about bun installing and autocorrect
chore(package.json): add autocorrect to format script
1 parent 9b55621 commit cef16f3

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,17 @@
1919
- 合并到上游仓库,并由 github action 自动构建
2020

2121
```sh
22+
bun i // 安装依赖
2223
bun dev // 启动热更开发服务
23-
bun format // 运行 prettier 格式化程序
24+
bun format // 运行 prettier, zig fmt 和 autocorrect 格式化程序
2425
bun run build // 构建产物
2526
bun run preview // 运行预览
2627
```
2728

28-
注意:本文档所使用的构建工具为 [bunjs](https://bun.sh/),在提交时请勿将其他 nodejs 的包管理工具的额外配置文件添加到仓库中。
29+
> [!NOTE]
30+
> 请自行安装 `bun` (建议也安装 `autocorrect`,并且在提交前运行 `bun format`
31+
32+
> [!NOTE]
33+
> 本文档所使用的构建工具为 [bunjs](https://bun.sh/),在提交时请勿将其他 nodejs 的包管理工具的额外配置文件添加到仓库中。
2934
3035
> 如需要更新依赖,请参照此处 [Lockfile](https://bun.sh/docs/install/lockfile) 先设置 git 使用 bun 来 diff 文件!

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"scripts": {
3-
"format": "prettier --write . && zig fmt . --exclude zig-out",
3+
"format": "prettier --write . && zig fmt . --exclude zig-out && autocorrect --fix",
44
"dev": "vitepress dev course",
55
"build": "vitepress build course",
66
"preview": "vitepress preview course",

0 commit comments

Comments
 (0)