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