feat 同步前端代码

feat 同步PC代码
feat 增加1.9DB
feat 同步逻辑
This commit is contained in:
damonyuan
2024-08-29 00:24:01 +08:00
parent 1e233d1207
commit 7badc8ae0f
352 changed files with 42846 additions and 37408 deletions

View File

@@ -1,15 +1,14 @@
import { execaCommand } from 'execa'
import path from 'path'
import fsExtra from 'fs-extra'
import path from 'path'
const { existsSync, remove, copy } = fsExtra
const cwd = process.cwd()
//打包发布路径,谨慎改动
const releaseRelativePath = '../public/admin'
const releaseRelativePath = '../server/public/admin'
const distPath = path.resolve(cwd, 'dist')
const releasePath = path.resolve(cwd, releaseRelativePath)
async function build() {
await execaCommand('vite build', { stdio: 'inherit', encoding: 'utf-8', cwd })
if (existsSync(releasePath)) {
await remove(releasePath)
}