mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-26 07:32:01 +00:00
Merge pull request #48 from pi0/patch-1
Use `nuxt.build()` instead of promises
This commit is contained in:
commit
df01ab86dd
11
README.md
11
README.md
@ -84,13 +84,10 @@ const options = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Launch nuxt build with given options
|
// Launch nuxt build with given options
|
||||||
new Nuxt(options)
|
// TODO: you can wrap below inside try/catch to catch any errors.
|
||||||
.then((nuxt) => {
|
let nuxt = new Nuxt(options).build();
|
||||||
// You can use nuxt.render(req, res) or nuxt.renderRoute(route, context)
|
// You can use nuxt.render(req, res) or nuxt.renderRoute(route, context)
|
||||||
})
|
|
||||||
.catch((error) {
|
|
||||||
// If an error appended while building the project
|
|
||||||
})
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user