调整工程目录
This commit is contained in:
12
bin/serve.js
12
bin/serve.js
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user