针对oms专项进行启动和页面优化

This commit is contained in:
aixianling
2024-10-11 10:10:06 +08:00
parent 104f5d1049
commit e2e957880b
2 changed files with 7 additions and 5 deletions

View File

@@ -21,11 +21,11 @@ const getAppInfo = (file, apps) => {
const start = () => {
chalkTag.info("开始扫描库工程...")
const {VUE_APP_SCOPE} = process.env
const list = []
Promise.all([
findApp('packages', app => getAppInfo(app, list)),
findApp('project', app => getAppInfo(app, list)),
]).then(() => {
let scanScope = ['packages', 'project']
if (VUE_APP_SCOPE) scanScope = [`project/${VUE_APP_SCOPE}`]
Promise.all(scanScope.map(e => findApp(e, app => getAppInfo(app, list)))).then(() => {
fsExtra.outputFile('examples/router/apps.js', `export default [${list.map(e => {
const {name, label, path, esm} = e
return `{name:"${name}",label:"${label}",path:"${path}",component:()=>import("@${esm}")}`