mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 16:12:12 +00:00
correct templateVars usage
This commit is contained in:
parent
4869770570
commit
7835e3611d
@ -190,6 +190,7 @@ function * generateRoutesAndFiles () {
|
|||||||
]
|
]
|
||||||
this.options.store = fs.existsSync(join(this.srcDir, 'store'))
|
this.options.store = fs.existsSync(join(this.srcDir, 'store'))
|
||||||
let templateVars = {
|
let templateVars = {
|
||||||
|
nuxt: this.options,
|
||||||
uniqBy: _.uniqBy,
|
uniqBy: _.uniqBy,
|
||||||
isDev: this.dev,
|
isDev: this.dev,
|
||||||
router: {
|
router: {
|
||||||
@ -253,11 +254,11 @@ function * generateRoutesAndFiles () {
|
|||||||
imports: {
|
imports: {
|
||||||
serialize,
|
serialize,
|
||||||
hash
|
hash
|
||||||
},
|
}
|
||||||
options: options || {},
|
|
||||||
nuxt: this.options
|
|
||||||
})
|
})
|
||||||
const content = template(templateVars)
|
const content = template(Object.assign({}, templateVars, {
|
||||||
|
options: options || {}
|
||||||
|
}))
|
||||||
const path = r(this.dir, '.nuxt', dst)
|
const path = r(this.dir, '.nuxt', dst)
|
||||||
return writeFile(path, content, 'utf8')
|
return writeFile(path, content, 'utf8')
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
Loading…
Reference in New Issue
Block a user