小程序仓库路径统一化完成
This commit is contained in:
16
bin/lib.js
Normal file
16
bin/lib.js
Normal 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()
|
||||
Reference in New Issue
Block a user