mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-30 01:17:16 +00:00
add layouts folder for extends app
This commit is contained in:
parent
3536936856
commit
57997e294e
@ -202,9 +202,15 @@ function * generateRoutesAndFiles () {
|
|||||||
if (files.includes('pages/_app.vue')) {
|
if (files.includes('pages/_app.vue')) {
|
||||||
templateVars.appPath = r(this.dir, 'pages/_app.vue')
|
templateVars.appPath = r(this.dir, 'pages/_app.vue')
|
||||||
}
|
}
|
||||||
|
if (fs.existsSync(join(this.dir, 'layouts', 'app.vue'))) {
|
||||||
|
templateVars.appPath = r(this.dir, 'layouts/app.vue')
|
||||||
|
}
|
||||||
if (files.includes('pages/_error.vue')) {
|
if (files.includes('pages/_error.vue')) {
|
||||||
templateVars.components.ErrorPage = r(this.dir, 'pages/_error.vue')
|
templateVars.components.ErrorPage = r(this.dir, 'pages/_error.vue')
|
||||||
}
|
}
|
||||||
|
if (fs.existsSync(join(this.dir, 'layouts', 'error.vue'))) {
|
||||||
|
templateVars.appPath = r(this.dir, 'layouts/error.vue')
|
||||||
|
}
|
||||||
let moveTemplates = templatesFiles.map((file) => {
|
let moveTemplates = templatesFiles.map((file) => {
|
||||||
return readFile(r(__dirname, '..', 'app', file), 'utf8')
|
return readFile(r(__dirname, '..', 'app', file), 'utf8')
|
||||||
.then((fileContent) => {
|
.then((fileContent) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user