Files
zkxw/web-admin/scripts/clean-dev.ts
T
2026-06-30 16:48:52 +08:00

39 lines
1.1 KiB
TypeScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* 可选本地维护脚本(`pnpm run clean:dev`)
*
* 说明:历史上本脚本会批量删除模板演示资源并重写 `router/modules`、README 等,
* 与当前 zkxw 已裁剪的 `web-admin` 冲突。**已移除所有破坏性步骤**。
*
* 模板升级日志 mock 已删除,当前无待清理项。
*/
const theme = {
reset: '\x1b[0m',
bold: '\x1b[1m',
dim: '\x1b[2m',
primary: '\x1b[38;5;75m',
success: '\x1b[38;5;82m',
gray: '\x1b[38;5;245m'
}
const fmt = {
title: (t: string) => `${theme.bold}${theme.primary}${t}${theme.reset}`,
success: (t: string) => `${theme.success}${t}${theme.reset}`,
dim: (t: string) => `${theme.dim}${theme.gray}${t}${theme.reset}`
}
async function main() {
console.clear()
console.log()
console.log(` ${fmt.title('web-admin · clean-dev(安全模式)')}`)
console.log(` ${fmt.dim('不会删除路由、README、业务页面或重写 routesAlias。')}`)
console.log(` ${fmt.dim('当前无模板演示资源需要清理。')}`)
console.log()
console.log(` ${fmt.success('完成')}`)
console.log()
}
main().catch((err) => {
console.error(err)
process.exit(1)
})