mirror of
https://github.com/xiangshu233/vue3-vant4-mobile.git
synced 2025-04-06 03:57:47 +08:00
25 lines
543 B
TypeScript
25 lines
543 B
TypeScript
// #!/usr/bin/env node
|
|
|
|
import colors from 'picocolors'
|
|
|
|
import pkg from '../../package.json'
|
|
import { runBuildConfig } from './buildConf'
|
|
|
|
export async function runBuild() {
|
|
try {
|
|
const argvList = process.argv.splice(2)
|
|
|
|
// Generate configuration file
|
|
if (!argvList.includes('disabled-config')) {
|
|
await runBuildConfig()
|
|
}
|
|
|
|
console.log(`✨ ${colors.cyan(`[${pkg.name}]`)} - build successfully!`)
|
|
}
|
|
catch (error) {
|
|
console.log(colors.red(`vite build error:\n${error}`))
|
|
process.exit(1)
|
|
}
|
|
}
|
|
runBuild()
|