From 336ebd495925f63e8baa8396b64b6d3a75361795 Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Thu, 11 May 2017 23:17:53 +0430 Subject: [PATCH] templatesFiles ~> templates --- lib/build.js | 7 +++---- lib/module.js | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/build.js b/lib/build.js index 38abb243a6..b5c23170e4 100644 --- a/lib/build.js +++ b/lib/build.js @@ -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) => { diff --git a/lib/module.js b/lib/module.js index 3628212a96..4d4414a927 100755 --- a/lib/module.js +++ b/lib/module.js @@ -40,7 +40,7 @@ class Module { dst, options: template.options } - this.options.build.templatesFiles.push(templateObj) + this.options.build.templates.push(templateObj) return templateObj }