mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-30 01:17:16 +00:00
Nuxt() does not call build() anymore
This commit is contained in:
parent
495c46040b
commit
43f51c402a
15
lib/nuxt.js
15
lib/nuxt.js
@ -70,22 +70,15 @@ class Nuxt {
|
|||||||
this._nuxtRegexp = /^\/_nuxt\//
|
this._nuxtRegexp = /^\/_nuxt\//
|
||||||
this.serveStaticNuxt = pify(serveStatic(resolve(this.dir, '.nuxt', 'dist')))
|
this.serveStaticNuxt = pify(serveStatic(resolve(this.dir, '.nuxt', 'dist')))
|
||||||
// Add this.build
|
// Add this.build
|
||||||
this.build = build.bind(this)
|
build.options.call(this) // Add build options
|
||||||
|
this.build = () => co(build.build.bind(this))
|
||||||
// Add this.render and this.renderRoute
|
// Add this.render and this.renderRoute
|
||||||
this.render = render.render.bind(this)
|
this.render = render.render.bind(this)
|
||||||
this.renderRoute = render.renderRoute.bind(this)
|
this.renderRoute = render.renderRoute.bind(this)
|
||||||
|
this.renderAndGetWindow = render.renderAndGetWindow.bind(this)
|
||||||
// Add this.generate
|
// Add this.generate
|
||||||
this.generate = generate.bind(this)
|
this.generate = generate.bind(this)
|
||||||
// Launch build and set this.renderer
|
return this
|
||||||
return co(this.build)
|
|
||||||
.then(() => {
|
|
||||||
if (typeof cb === 'function') cb(null, this)
|
|
||||||
return this
|
|
||||||
})
|
|
||||||
.catch((err) => {
|
|
||||||
if (typeof cb === 'function') cb(err)
|
|
||||||
return Promise.reject(err)
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
close (callback) {
|
close (callback) {
|
||||||
|
Loading…
Reference in New Issue
Block a user