WuYongJie 5821d73291 初始提交:3D家具安装展示系统
包含:
- furniture-3d-system:Next.js 16 全栈应用(资产中心、产品管理、3D装配动画)
- autocad-plugin:AutoCAD 家具导出插件源码
- 资产中心改造:编辑弹窗化、删除功能、Toast反馈、自定义Select组件

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-02 14:00:19 +08:00

79 lines
1.5 KiB
JavaScript

const fs = require('fs/promises')
const path = require('path')
const root = process.cwd()
const directories = [
'.codex-logs',
'_logs',
'.next',
'coverage',
'output',
'temp',
]
const files = [
'%OUT%',
'nul',
'dev-server.log',
'trace-deprecation-build.log',
'typecheck-latest.log',
'tsconfig.tsbuildinfo',
]
const globPatterns = [
/^\.dev-.*\.log$/,
/^\.qa-.*\.log$/,
/^\.start-.*\.log$/,
/^\.next-start-.*\.log$/,
]
async function removeTarget(relativePath, removed) {
const absolutePath = path.join(root, relativePath)
try {
await fs.rm(absolutePath, { recursive: true, force: true })
removed.push(relativePath)
} catch (error) {
console.warn(`[skip] ${relativePath}: ${error.message}`)
}
}
async function main() {
const removed = []
const entries = await fs.readdir(root, { withFileTypes: true })
for (const directory of directories) {
await removeTarget(directory, removed)
}
for (const file of files) {
await removeTarget(file, removed)
}
for (const entry of entries) {
if (!entry.isFile()) {
continue
}
if (globPatterns.some((pattern) => pattern.test(entry.name))) {
await removeTarget(entry.name, removed)
}
}
if (removed.length === 0) {
console.log('No local artifacts removed.')
return
}
console.log('Removed local artifacts:')
for (const item of removed) {
console.log(`- ${item}`)
}
}
main().catch((error) => {
console.error(error)
process.exitCode = 1
})