From 14a3e684aa55364ac553593ef3fff2853ed59dca Mon Sep 17 00:00:00 2001 From: aixianling Date: Thu, 31 Oct 2024 14:47:24 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=B8=8B=E5=B7=A5=E7=A8=8B?= =?UTF-8?q?=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/build.js | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/bin/build.js b/bin/build.js index 71e84e5f..6b25d5f0 100644 --- a/bin/build.js +++ b/bin/build.js @@ -58,15 +58,14 @@ module.exports = id => { manifest.h5.publicPath = extra.base || "/" let tasks = [] return generate(extra) - .then(() => customPath ? copyFiles('src/apps', 'library/project/' + customPath) : fsExtra.emptyDir('src/apps')) - .then(() => { - appList?.map(e => { - if (!/project/.test(e.id)) - tasks.push({dir: 'src/apps/' + e.name, source: 'library/apps/' + e.name}) + .then(() => customPath ? copyFiles('src/apps', 'library/project/' + customPath) : fsExtra.emptyDir('src/apps')) + .then(() => { + appList?.map(e => { + if (!/project/.test(e.id)) + tasks.push({dir: 'src/apps/' + e.name, source: 'library/apps/' + e.name}) + }) + return res.data.data }) - return Promise.all([ - copyFiles("src/components/pages", 'library/components/pages'), ...tasks.map(e => copyFiles(e.dir, e.source))]) - }).then(() => res.data.data) } else Promise.reject("无法找到项目") }) }