调整下工程结构
This commit is contained in:
15
bin/build.js
15
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("无法找到项目")
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user