chore: migrate package manager from npm to bun

This commit is contained in:
RhenCloud 2026-08-13 20:34:52 +08:00
parent cf65111e4e
commit 41ad1a036b
No known key found for this signature in database
GPG key ID: A574A617378C4E0B
14 changed files with 1903 additions and 16113 deletions

View file

@ -2,7 +2,7 @@
## 前置要求
- [Node.js](https://nodejs.org/) 18+
- [Bun](https://bun.sh/) 1.x唯一包管理器不要使用 npm
- [Cloudflare 账号](https://dash.cloudflare.com/)(免费套餐即可)
- [GitHub App](https://github.com/settings/apps/new)(参见 [GitHub App 设置](/zh/guide/deployment#github-app-设置)
- Discord Bot Token参见 [Discord Bot 设置](/zh/guide/deployment#discord-bot-设置)
@ -12,7 +12,7 @@
```bash
git clone https://github.com/ReCloudStudio/WebHooker.git
cd WebHooker
npm install
bun install
```
## 本地开发
@ -48,7 +48,7 @@ BASE_URL=http://localhost:8787
### 2. 启动开发服务器
```bash
npm run dev
bun run dev
```
这将在 `http://localhost:8787` 启动本地 Miniflare 环境。
@ -64,12 +64,12 @@ curl http://localhost:8787/health
| 脚本 | 说明 |
| ---------------------- | ----------------------------- |
| `npm run dev` | 启动本地开发服务器 (wrangler) |
| `npm run deploy` | 部署到 Cloudflare |
| `npm run typecheck` | TypeScript 类型检查 |
| `npm run lint` | ESLint |
| `npm run lint:md` | Markdownlint |
| `npm run format` | 使用 Prettier 格式化 |
| `npm run format:check` | 检查 Prettier 格式 |
| `npm run docs:dev` | 启动文档开发服务器 |
| `npm run docs:build` | 构建文档站点 |
| `bun run dev` | 启动本地开发服务器 (wrangler) |
| `bun run deploy` | 部署到 Cloudflare |
| `bun run typecheck` | TypeScript 类型检查 |
| `bun run lint` | ESLint |
| `bun run lint:md` | Markdownlint |
| `bun run format` | 使用 Prettier 格式化 |
| `bun run format:check` | 检查 Prettier 格式 |
| `bun run docs:dev` | 启动文档开发服务器 |
| `bun run docs:build` | 构建文档站点 |