调整下工程结构

This commit is contained in:
aixianling
2024-10-31 14:47:24 +08:00
parent fc9864bb7d
commit 14a3e684aa

View File

@@ -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("无法找到项目")
})
}