mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-26 15:42:09 +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.serveStaticNuxt = pify(serveStatic(resolve(this.dir, '.nuxt', 'dist')))
|
||||
// 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
|
||||
this.render = render.render.bind(this)
|
||||
this.renderRoute = render.renderRoute.bind(this)
|
||||
this.renderAndGetWindow = render.renderAndGetWindow.bind(this)
|
||||
// Add this.generate
|
||||
this.generate = generate.bind(this)
|
||||
// Launch build and set this.renderer
|
||||
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)
|
||||
})
|
||||
return this
|
||||
}
|
||||
|
||||
close (callback) {
|
||||
|
Loading…
Reference in New Issue
Block a user