mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 16:12:12 +00:00
templatesFiles ~> templates
This commit is contained in:
parent
4800a9e8fd
commit
336ebd4959
@ -58,7 +58,7 @@ const defaults = {
|
|||||||
plugins: [],
|
plugins: [],
|
||||||
babel: {},
|
babel: {},
|
||||||
postcss: [],
|
postcss: [],
|
||||||
templatesFiles: []
|
templates: []
|
||||||
}
|
}
|
||||||
const defaultsLoaders = [
|
const defaultsLoaders = [
|
||||||
{
|
{
|
||||||
@ -245,10 +245,9 @@ function * generateRoutesAndFiles () {
|
|||||||
// Resolve all internal template files relative to app directory
|
// Resolve all internal template files relative to app directory
|
||||||
templatesFiles = templatesFiles.map(file => { return {src: r(__dirname, 'app', file), dst: file} })
|
templatesFiles = templatesFiles.map(file => { return {src: r(__dirname, 'app', file), dst: file} })
|
||||||
// Add external template files (used in modules)
|
// Add external template files (used in modules)
|
||||||
if (Array.isArray(this.options.build.templatesFiles)) {
|
if (Array.isArray(this.options.build.templates)) {
|
||||||
templatesFiles = templatesFiles.concat(this.options.build.templatesFiles)
|
templatesFiles = templatesFiles.concat(this.options.build.templates)
|
||||||
}
|
}
|
||||||
|
|
||||||
let moveTemplates = templatesFiles.map(({src, dst, options}) => {
|
let moveTemplates = templatesFiles.map(({src, dst, options}) => {
|
||||||
return readFile(src, 'utf8')
|
return readFile(src, 'utf8')
|
||||||
.then((fileContent) => {
|
.then((fileContent) => {
|
||||||
|
@ -40,7 +40,7 @@ class Module {
|
|||||||
dst,
|
dst,
|
||||||
options: template.options
|
options: template.options
|
||||||
}
|
}
|
||||||
this.options.build.templatesFiles.push(templateObj)
|
this.options.build.templates.push(templateObj)
|
||||||
return templateObj
|
return templateObj
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user