2022-01-08 17:20:46 +08:00
|
|
|
import chalk from 'chalk'
|
|
|
|
import { runBuildConfig } from './build-config'
|
2022-01-25 15:25:29 +08:00
|
|
|
import { runBuildCNAME } from './build-cname'
|
2022-01-08 17:20:46 +08:00
|
|
|
|
|
|
|
export const runBuild = async () => {
|
|
|
|
try {
|
|
|
|
runBuildConfig()
|
2022-01-25 15:25:29 +08:00
|
|
|
runBuildCNAME()
|
2022-01-08 17:20:46 +08:00
|
|
|
console.log(`✨ ${chalk.cyan('build successfully!')}`)
|
|
|
|
} catch (error) {
|
|
|
|
console.log(chalk.red('vite build error:\n' + error))
|
|
|
|
process.exit(1)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
runBuild()
|