feat:系统框架

This commit is contained in:
wlx committed 2026-06-29 19:27:33 +08:00
commit c1f1b39e81
25 files changed
+7515

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
import { copyFile, mkdir, rm } from 'node:fs/promises'
import { dirname, join } from 'node:path'
import { fileURLToPath } from 'node:url'
const files = ['index.html', 'assets/admin-app.css', 'assets/admin-app.js']
const root = new URL('../', import.meta.url)
const appRoot = new URL('./app/', root)
const distRoot = new URL('./dist/', root)
await rm(distRoot, { recursive: true, force: true })
for (const file of files) {
const source = new URL(file, appRoot)
const target = new URL(file, distRoot)
await mkdir(dirname(fileURLToPath(target)), { recursive: true })
await copyFile(source, target)
}
console.log(`Built ${files.length} files to ${join(fileURLToPath(root), 'dist')}`)