f9cb72ed06
- apps/viewer (@photo/viewer): Vite 5 + Vue 3.4 + TS 最小骨架(无 Pinia/UI 库) - router: /a/:token 活动页 + /a/:token/p/:photoId 单图深链(复用活动页组件) - i18n: vue-i18n 9,zh-CN/en 词条,localStorage(viewer.locale) 持久 + navigator.language 检测兜底 zh-CN;顶栏语言切换组件;文案全量走 i18n - api client: 类型化 fetch 封装(契约生成类型直连),错误信封 → ApiError, 错误码 → i18n key 映射表(src/api/errors.ts) - scripts: dev/build/preview/test(vitest 10 例)/test:e2e(Playwright 冒烟, webServer 自拉 dev)/lint/vue-tsc 全部接入 turbo - root: +@playwright/test、+eslint-plugin-vue(flat config 收敛到 apps/**/*.vue)、 pnpm.onlyBuiltDependencies 放行 esbuild Co-Authored-By: Claude Code <noreply@anthropic.com>
32 lines
800 B
JSON
32 lines
800 B
JSON
{
|
|
"name": "@photo/viewer",
|
|
"version": "0.1.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"description": "Viewer lightweight entry (Vue 3 + Vite): album page, waterfall, photo viewer, zh-CN/en i18n; reads cn public API",
|
|
"scripts": {
|
|
"dev": "vite",
|
|
"build": "vite build",
|
|
"preview": "vite preview",
|
|
"lint": "eslint .",
|
|
"typecheck": "vue-tsc --noEmit",
|
|
"test": "vitest run",
|
|
"test:e2e": "playwright test"
|
|
},
|
|
"dependencies": {
|
|
"@photo/contracts": "workspace:*",
|
|
"vue": "~3.4.0",
|
|
"vue-i18n": "^9.14.0",
|
|
"vue-router": "~4.4.0"
|
|
},
|
|
"devDependencies": {
|
|
"@vitejs/plugin-vue": "^5.2.0",
|
|
"@vue/test-utils": "^2.4.6",
|
|
"jsdom": "^25.0.0",
|
|
"typescript": "^5.6.0",
|
|
"vite": "~5.4.0",
|
|
"vitest": "^2.1.0",
|
|
"vue-tsc": "^2.2.0"
|
|
}
|
|
}
|