|
|
@ -22,13 +22,16 @@ if (!command || command === 'dev') {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.catch((err) => {
|
|
|
|
.catch((err) => {
|
|
|
|
console.error(chalk.red(`failed to start server. error:\n`), err)
|
|
|
|
console.error(chalk.red(`failed to start server. error:\n`), err)
|
|
|
|
|
|
|
|
process.exit(1)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
} else if (command === 'build') {
|
|
|
|
} else if (command === 'build') {
|
|
|
|
require('../dist/node')
|
|
|
|
require('../dist/node')
|
|
|
|
.build(argv)
|
|
|
|
.build(argv)
|
|
|
|
.catch((err) => {
|
|
|
|
.catch((err) => {
|
|
|
|
console.error(chalk.red(`build error:\n`), err)
|
|
|
|
console.error(chalk.red(`build error:\n`), err)
|
|
|
|
|
|
|
|
process.exit(1)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
console.log(chalk.red(`unknown command "${command}".`))
|
|
|
|
console.log(chalk.red(`unknown command "${command}".`))
|
|
|
|
|
|
|
|
process.exit(1)
|
|
|
|
}
|
|
|
|
}
|
|
|
|