针对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}")}`

View File

@@ -9,7 +9,8 @@
"oms": "vue-cli-service serve examples/main.js --mode oms",
"sync": "node bin/appsSync.js",
"preview": "vue-cli-service serve",
"predev": "node bin/scanApps.js"
"predev": "node bin/scanApps.js",
"preoms": "dotenv -e .env.oms node bin/scanApps.js"
},
"dependencies": {
"@amap/amap-jsapi-loader": "^1.0.1",
@@ -46,6 +47,7 @@
"axios": "^0.19.2",
"babel-eslint": "^10.1.0",
"core-js": "^2.6.11",
"dotenv-cli": "^7.4.2",
"element-ui": "^2.15.9",
"eslint": "^5.16.0",
"eslint-plugin-vue": "^5.0.0",