chore: pnpm workspace and turbo pipeline

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
浅念
2026-09-17 16:24:12 +08:00
parent d973c714f0
commit 68a7d6a6d4
8 changed files with 1097 additions and 2 deletions
+3
View File
@@ -9,3 +9,6 @@ trim_trailing_whitespace = true
[*.{json,ts,tsx,yaml,yml,js,jsx}]
indent_style = space
indent_size = 2
[*.md]
trim_trailing_whitespace = false
+1
View File
@@ -0,0 +1 @@
* text=auto eol=lf
+3
View File
@@ -7,3 +7,6 @@ coverage/
!.env.example
*.log
.DS_Store
*.tsbuildinfo
Thumbs.db
Desktop.ini
@@ -27,7 +27,7 @@
**Files:**
- Create: `.gitignore`, `.editorconfig`, `.nvmrc`, `README.md`, `docs/plans/progress/.gitkeep`
- [ ] **Step 1: 初始化仓库与目录**
- [x] **Step 1: 初始化仓库与目录**(完成:提交 d973c71,2026-09-17)
```bash
cd /d/project/photo
@@ -51,7 +51,7 @@ coverage/
`.nvmrc`:`20`
- [ ] **Step 2: 首次提交**
- [x] **Step 2: 首次提交**(完成:d973c71,含全部 docs/,双审通过)
```bash
git add -A && git commit -m "chore: init repository skeleton"
@@ -63,6 +63,9 @@ Expected: 首个提交生成,主干 main。
**Files:**
- Create: `package.json`, `pnpm-workspace.yaml`, `turbo.json`
- Create: `.gitattributes`、`.gitignore`/`.editorconfig` 增补(Task 1 质量审查遗留项:`*.tsbuildinfo` 忽略、`* text=auto eol=lf`、`[*.md] trim_trailing_whitespace=false`、`Thumbs.db`/`Desktop.ini`)
> Task 4 策略预定:`src/generated/` 生成类型**提交入库**(消费方免跑 gen,契约变更加 sha 可审)。
- [ ] **Step 1: 写入三个根配置**
+26
View File
@@ -0,0 +1,26 @@
{
"name": "photo-live",
"private": true,
"packageManager": "pnpm@9.12.0",
"engines": { "node": ">=20" },
"scripts": {
"lint": "turbo run lint",
"typecheck": "turbo run typecheck",
"test": "turbo run test",
"build": "turbo run build",
"db:migrate": "dotenv -e .env -- pnpm --filter @photo/db-cn exec prisma migrate dev",
"db:generate": "dotenv -e .env -- pnpm --filter @photo/db-cn exec prisma generate",
"db:studio": "dotenv -e .env -- pnpm --filter @photo/db-cn exec prisma studio",
"dev:api": "dotenv -e .env -- pnpm --filter @photo/api-cn start",
"dev:worker": "dotenv -e .env -- pnpm --filter @photo/worker start",
"e2e": "turbo run test:e2e"
},
"devDependencies": {
"turbo": "^2.3.0",
"typescript": "^5.6.0",
"prettier": "^3.3.0",
"dotenv-cli": "^7.4.0",
"eslint": "^9.0.0",
"typescript-eslint": "^8.0.0"
}
}
+1046
View File
File diff suppressed because it is too large Load Diff
+4
View File
@@ -0,0 +1,4 @@
packages:
- apps/*
- packages/*
- services/*
+9
View File
@@ -0,0 +1,9 @@
{
"tasks": {
"build": { "dependsOn": ["^build"], "outputs": ["dist/**"] },
"lint": {},
"typecheck": { "dependsOn": ["^build"] },
"test": { "dependsOn": ["^build"] },
"test:e2e": { "dependsOn": ["^build"] }
}
}