小程序仓库路径统一化完成

This commit is contained in:
aixianling
2022-05-12 10:58:39 +08:00
parent 115ba62141
commit 5a4c6103e6
8 changed files with 101 additions and 137 deletions

16
bin/lib.js Normal file
View File

@@ -0,0 +1,16 @@
const {findApp, chalkTag, copyFiles} = require("./tools");
const start = () => {
chalkTag.info("扫描主库目录,并搬运打包应用至lib文件夹下")
let apps = []
findApp('src/mods', file => apps.push(file))
.then(() => Promise.all([...new Set(apps)].map(e => {
let name = e.replace(/.+[\\\/]([^\\\/]+)$/, '$1')
if (/^App/.test(name)) {
return copyFiles(`lib/${name}`, e)
}
})))
.then(() => {
chalkTag.done("打包完成")
})
}
start()