mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-12 00:27:21 +02:00
handle promise error & exit properly (#809)
This commit is contained in:
parent
c0aa98bd55
commit
f598e2583f
1 changed files with 8 additions and 2 deletions
|
@ -33,5 +33,11 @@ if (!fs.existsSync(CWD + '/siteConfig.js')) {
|
|||
|
||||
// generate all static html files
|
||||
const generate = require('./server/generate.js');
|
||||
generate();
|
||||
generate()
|
||||
.then(() => {
|
||||
console.log("Site built successfully. Generated files in 'build' folder.");
|
||||
})
|
||||
.catch(error => {
|
||||
console.error(error);
|
||||
process.exit(1);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue