chore: 导入清理前的完整工程状态(含 Capacitor 原生壳,作为回滚备份点)

This commit is contained in:
toor
2026-10-21 11:50:10 +08:00
committed by trae-solo-agent
commit 8ded87a3a8
389 changed files with 52242 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
import { cpSync, existsSync, rmSync } from 'node:fs'
import { resolve } from 'node:path'
// Deploy targets (Netlify, Vercel, Cloudflare Pages, EdgeOne, Docker, Capacitor) read `dist/`
// at the repo root, so mirror the web app's static output there.
const root = resolve(import.meta.dirname, '..')
const webDist = resolve(root, 'apps/web/dist')
const rootDist = resolve(root, 'dist')
if (!existsSync(webDist))
throw new Error('apps/web/dist not found, run `pnpm -C apps/web run generate` first')
rmSync(rootDist, { recursive: true, force: true })
cpSync(webDist, rootDist, { recursive: true, dereference: true })
console.log('Copied apps/web/dist to dist/')