add cleaning

This commit is contained in:
2026-07-02 18:31:15 +08:00
parent 3bf9f08c03
commit 2522d7a28f
+5
View File
@@ -15,6 +15,7 @@ const path = require('path');
const projectDir = __dirname; const projectDir = __dirname;
const srcDir = path.join(projectDir, 'src'); const srcDir = path.join(projectDir, 'src');
const distDir = path.join(projectDir, 'dist'); const distDir = path.join(projectDir, 'dist');
const buildDir = path.join(projectDir, 'build');
const signDir = path.join(projectDir, 'sign'); const signDir = path.join(projectDir, 'sign');
const isRelease = process.argv.includes('--release'); const isRelease = process.argv.includes('--release');
@@ -98,6 +99,10 @@ function cleanDist() {
fs.rmSync(distDir, { recursive: true, force: true }); fs.rmSync(distDir, { recursive: true, force: true });
console.log('🧹 已清理 dist 目录'); console.log('🧹 已清理 dist 目录');
} }
if (fs.existsSync(buildDir)) {
fs.rmSync(buildDir, { recursive: true, force: true });
console.log('🧹 已清理 build 目录');
}
} }
/** /**