增加手动同步库信息脚本
This commit is contained in:
		| @@ -9,7 +9,7 @@ const saveApps = app => { | ||||
|   } else return Promise.reject("没有应用") | ||||
| } | ||||
| const getAppInfo = (file, apps) => { | ||||
|   if (/[\\\/](App[^\\\/]+)\.vue$/g.test(file)) { | ||||
|   if (/[\\\/](App[A-Z][^\\\/]+)\.vue$/g.test(file)) { | ||||
|     const name = file.replace(/.+[\\\/](App[^\\\/]+)\.vue$/, '$1'), | ||||
|         source = fs.readFileSync(file).toString(), | ||||
|         parsed = compiler.parseComponent(source), | ||||
| @@ -18,7 +18,7 @@ const getAppInfo = (file, apps) => { | ||||
|     apps.push({ | ||||
|       id: file.replace(/\.vue$/, '').replace(/[\\\/]/g, '_'), | ||||
|       label: label || name, | ||||
|       libPath: file.replace(/\.vue$/, ''), | ||||
|       libPath: `/${file.replace(/\.vue$/, '').replace(/[\\\/]/g, '/')}`, | ||||
|       name, | ||||
|       type: 'web' | ||||
|     }) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user