mirror of
https://github.com/Elysola/WebHooker.git
synced 2026-11-21 01:23:40 +00:00
chore: migrate package manager from npm to bun
This commit is contained in:
14 files changed
+1903
-16113
No files matched your search
+13
-13
@@ -5,9 +5,9 @@
|
||||
```bash
|
||||
git clone https://github.com/ReCloudStudio/WebHooker.git
|
||||
cd WebHooker
|
||||
npm install
|
||||
bun install
|
||||
cp .env.example .dev.vars # 填入密钥
|
||||
npm run dev # 启动本地开发服务器
|
||||
bun run dev # 启动本地开发服务器
|
||||
```
|
||||
|
||||
## 项目结构
|
||||
@@ -81,15 +81,15 @@ tests/ # 单元测试 (bun test)
|
||||
|
||||
| 命令 | 说明 |
|
||||
| ---------------------- | ----------------------------- |
|
||||
| `npm run dev` | 启动 Nuxt 开发服务器 (HMR) |
|
||||
| `npm run typecheck` | TypeScript 类型检查 |
|
||||
| `npm run lint` | ESLint (TypeScript) |
|
||||
| `npm run lint:md` | Markdownlint (Markdown) |
|
||||
| `npm test` | 运行单元测试 (bun test) |
|
||||
| `npm run format` | 使用 Prettier 格式化所有文件 |
|
||||
| `npm run format:check` | 检查 Prettier 格式 |
|
||||
| `npm run docs:dev` | 启动 VitePress 文档开发服务器 |
|
||||
| `npm run docs:build` | 构建文档站点 |
|
||||
| `bun run dev` | 启动 Nuxt 开发服务器 (HMR) |
|
||||
| `bun run typecheck` | TypeScript 类型检查 |
|
||||
| `bun run lint` | ESLint (TypeScript) |
|
||||
| `bun run lint:md` | Markdownlint (Markdown) |
|
||||
| `bun test` | 运行单元测试 (bun test) |
|
||||
| `bun run format` | 使用 Prettier 格式化所有文件 |
|
||||
| `bun run format:check` | 检查 Prettier 格式 |
|
||||
| `bun run docs:dev` | 启动 VitePress 文档开发服务器 |
|
||||
| `bun run docs:build` | 构建文档站点 |
|
||||
|
||||
## 代码风格
|
||||
|
||||
@@ -106,7 +106,7 @@ tests/ # 单元测试 (bun test)
|
||||
|
||||
```bash
|
||||
# 运行单元测试套件 (bun test)
|
||||
npm test
|
||||
bun test
|
||||
|
||||
# 或手动检查健康端点
|
||||
curl http://localhost:8787/health
|
||||
@@ -127,5 +127,5 @@ curl http://localhost:8787/health
|
||||
|
||||
- 保持变更聚焦且原子化
|
||||
- 为所有函数返回值包含类型注解
|
||||
- 提交前运行 `npm run typecheck && npm run lint && npm run format:check`
|
||||
- 提交前运行 `bun run typecheck && bun run lint && bun run format:check`
|
||||
- 添加功能时更新文档(见 `AGENTS.md` → Documentation 的清单):README(`README.md` / `README.zh.md`)、VitePress 文档(`docs/` 与 `docs/zh/`)以及示例配置文件
|
||||
Reference in new issue
Block a user