调整工程目录

This commit is contained in:
aixianling
2021-12-15 14:37:20 +08:00
parent 76b0abe1ea
commit dd1aef6fb3
107 changed files with 17044 additions and 16746 deletions

View File

@@ -69,13 +69,23 @@ const start = () => {
}
}
findApp('src/apps', file => {
if (/.*\\.+\\App[^\\]+\\[^\\]+\.vue/g.test(file)) {
if (/.+\\App[^\\]+\\[^\\]+\.vue/g.test(file)) {
let app = {
name: file.replace(/.*\\([^\\]+).vue/g, '$1'),
path: file.replace(/^src\\(.*).vue/g, '$1').replace(/\\/g, '/')
}
json.pages.push(app)
}
}).then(() => {
return findApp('src/sass', file => {
if (/.+\\App[^\\]+\\[^\\]+\.vue/g.test(file)) {
let app = {
name: file.replace(/.*\\([^\\]+).vue/g, '$1'),
path: file.replace(/^src\\(.*).vue/g, '$1').replace(/\\/g, '/')
}
json.pages.push(app)
}
})
}).then(() => {
fsExtra.outputJson('src/pages.json', json, () => {
chalkTag.done('生成pages.json')