You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

24 lines
533 B

2 years ago
// #!/usr/bin/env node
import colors from 'picocolors'
import pkg from '../../package.json'
import { runBuildConfig } from './buildConf'
2 years ago
2 years ago
export function runBuild() {
2 years ago
try {
const argvList = process.argv.splice(2)
// Generate configuration file
if (!argvList.includes('disabled-config'))
2 years ago
runBuildConfig()
console.log(`${colors.cyan(`[${pkg.name}]`)}` + ' - build successfully!')
}
2 years ago
catch (error: any) {
console.log(colors.red(`vite build error:\n${error}`))
2 years ago
process.exit(1)
}
}
runBuild()