|
|
@ -28,14 +28,10 @@ if (!command || command === 'dev') {
|
|
|
|
process.exit(1)
|
|
|
|
process.exit(1)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
} else if (command === 'build') {
|
|
|
|
} else if (command === 'build') {
|
|
|
|
build(root, argv)
|
|
|
|
build(root, argv).catch((err) => {
|
|
|
|
.then(() => {
|
|
|
|
console.error(c.red(`build error:\n`), err)
|
|
|
|
process.exit()
|
|
|
|
process.exit(1)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.catch((err) => {
|
|
|
|
|
|
|
|
console.error(c.red(`build error:\n`), err)
|
|
|
|
|
|
|
|
process.exit(1)
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
} else if (command === 'serve') {
|
|
|
|
} else if (command === 'serve') {
|
|
|
|
serve(argv).catch((err) => {
|
|
|
|
serve(argv).catch((err) => {
|
|
|
|
console.error(c.red(`failed to start server. error:\n`), err)
|
|
|
|
console.error(c.red(`failed to start server. error:\n`), err)
|
|
|
|