Skip to content

Commit

Permalink
fix: add serve command
Browse files Browse the repository at this point in the history
  • Loading branch information
zuofenghua committed Dec 2, 2020
1 parent 529be76 commit 1a1277d
Show file tree
Hide file tree
Showing 7 changed files with 337 additions and 3,927 deletions.
8 changes: 8 additions & 0 deletions bin/vitepress-fc.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,16 @@ async function run() {
build(argv).catch((err) => {
console.error(chalk.red(`build error:\n`), err)
})
} else if (command === 'serve') {
require('../dist/node')
.serve(argv)
.catch((err) => {
console.error(chalk.red(`failed to start server. error:\n`), err)
process.exit(1)
})
} else {
console.log(chalk.red(`unknown command "${command}".`))
process.exit(1)
}
}

Expand Down
5 changes: 1 addition & 4 deletions docs/.vitepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,7 @@ module.exports = {
}
],

sidebar: {
'/': getGuideSidebar(),
'/guide': getGuideSidebar()
}
sidebar: getGuideSidebar()
}
}

Expand Down
Loading

0 comments on commit 1a1277d

Please sign in to comment.