feat: 项目结构调整|新增依赖

This commit is contained in:
duanshuwen
2025-11-22 21:17:40 +08:00
parent 38b6a4b4a3
commit 6013c38fe7
40 changed files with 535 additions and 115 deletions

21
build/scripts/clean.js Normal file
View File

@@ -0,0 +1,21 @@
const fs = require('fs')
const path = require('path')
function cleanDirectory(dirPath) {
const resolvedPath = path.resolve(dirPath)
const parentDir = path.basename(path.dirname(resolvedPath))
if (parentDir !== 'packages') {
console.error(`Error: Directory "${resolvedPath}" is not inside a "packages" folder`)
return
}
const distPath = path.join(resolvedPath, 'dist')
if (fs.existsSync(distPath)) {
fs.rmSync(distPath, { recursive: true, force: true })
console.log(`deleted: ${distPath}`)
}
}
cleanDirectory(process.cwd())