feat(scanApps): 增加扫描 core 工程的功能
- 在 start 函数中添加了对 VUE_APP_CORE 环境变量的检查 - 如果 VUE_APP_CORE 存在,将 'packages/core' 添加到扫描范围中
This commit is contained in:
@@ -21,10 +21,11 @@ const getAppInfo = (file, apps) => {
|
||||
|
||||
const start = () => {
|
||||
chalkTag.info("开始扫描库工程...")
|
||||
const {VUE_APP_SCOPE} = process.env
|
||||
const {VUE_APP_SCOPE, VUE_APP_CORE} = process.env
|
||||
const list = []
|
||||
let scanScope = ['packages', 'project']
|
||||
if (VUE_APP_SCOPE) scanScope = [`project/${VUE_APP_SCOPE}`]
|
||||
if (VUE_APP_CORE) scanScope.push('packages/core')
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user