From 2522d7a28f2f223efa9eb1a2cd609eab7351ae55 Mon Sep 17 00:00:00 2001 From: hanyixuanten Date: Thu, 2 Jul 2026 18:31:15 +0800 Subject: [PATCH] add cleaning --- build.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build.js b/build.js index efaa505..04a0068 100644 --- a/build.js +++ b/build.js @@ -15,6 +15,7 @@ const path = require('path'); const projectDir = __dirname; const srcDir = path.join(projectDir, 'src'); const distDir = path.join(projectDir, 'dist'); +const buildDir = path.join(projectDir, 'build'); const signDir = path.join(projectDir, 'sign'); const isRelease = process.argv.includes('--release'); @@ -98,6 +99,10 @@ function cleanDist() { fs.rmSync(distDir, { recursive: true, force: true }); console.log('🧹 已清理 dist 目录'); } + if (fs.existsSync(buildDir)) { + fs.rmSync(buildDir, { recursive: true, force: true }); + console.log('🧹 已清理 build 目录'); + } } /**