Commit a11a0f28 authored by Jiahao Luo's avatar Jiahao Luo
Browse files

chore(deps): 将包管理器从 npm 迁移到 pnpm

- docs: 更新 README 和 README_CN 中的安装说明
- build: 添加 pnpm-lock.yaml 和 .npmrc 配置
- build: 删除 package-lock.json 锁文件
- fix: 解决 peer dependency 冲突(legacy-peer-deps)
- perf: pnpm 提供更快的安装速度和更小的磁盘占用

🤖 Generated with [Claude Code](https://claude.com/claude-code

)
Co-Authored-By: default avatarClaude Sonnet 4.5 <noreply@anthropic.com>
parent 090c9e66
......@@ -218,20 +218,23 @@ Build and run from source code for development or customization.
git clone https://github.com/Wei-Shaw/sub2api.git
cd sub2api
# 2. Build frontend
# 2. Install pnpm (if not already installed)
npm install -g pnpm
# 3. Build frontend
cd frontend
npm install
npm run build
pnpm install
pnpm run build
# Output will be in ../backend/internal/web/dist/
# 3. Build backend with embedded frontend
# 4. Build backend with embedded frontend
cd ../backend
go build -tags embed -o sub2api ./cmd/server
# 4. Create configuration file
# 5. Create configuration file
cp ../deploy/config.example.yaml ./config.yaml
# 5. Edit configuration
# 6. Edit configuration
nano config.yaml
```
......@@ -291,7 +294,7 @@ go run ./cmd/server
# Frontend (with hot reload)
cd frontend
npm run dev
pnpm run dev
```
#### Code Generation
......
......@@ -218,20 +218,23 @@ docker-compose logs -f
git clone https://github.com/Wei-Shaw/sub2api.git
cd sub2api
# 2. 编译前端
# 2. 安装 pnpm(如果还没有安装)
npm install -g pnpm
# 3. 编译前端
cd frontend
npm install
npm run build
pnpm install
pnpm run build
# 构建产物输出到 ../backend/internal/web/dist/
# 3. 编译后端(嵌入前端)
# 4. 编译后端(嵌入前端)
cd ../backend
go build -tags embed -o sub2api ./cmd/server
# 4. 创建配置文件
# 5. 创建配置文件
cp ../deploy/config.example.yaml ./config.yaml
# 5. 编辑配置
# 6. 编辑配置
nano config.yaml
```
......@@ -291,7 +294,7 @@ go run ./cmd/server
# 前端(支持热重载)
cd frontend
npm run dev
pnpm run dev
```
#### 代码生成
......
legacy-peer-deps=true
# 允许运行所有包的构建脚本
# esbuild 和 vue-demi 是已知安全的包,需要 postinstall 脚本才能正常工作
ignore-scripts=false
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment