mirror of
https://github.com/fantastic-admin/basic.git
synced 2026-10-07 13:28:38 +08:00
26 lines
704 B
TypeScript
26 lines
704 B
TypeScript
import boxen from 'boxen'
|
|
import picocolors from 'picocolors'
|
|
import type { Plugin } from 'vite'
|
|
|
|
export default function appInfo(): Plugin {
|
|
return {
|
|
name: 'appInfo',
|
|
apply: 'serve',
|
|
async buildStart() {
|
|
const { bold, green, cyan, bgGreen, underline } = picocolors
|
|
// eslint-disable-next-line no-console
|
|
console.log(
|
|
boxen(
|
|
`${bold(green(`由 ${bgGreen('Fantastic-admin')} 驱动`))}\n\n${underline('https://fantastic-admin.gitee.io')}\n\n当前使用:${cyan('基础版')}`,
|
|
{
|
|
padding: 1,
|
|
margin: 1,
|
|
borderStyle: 'double',
|
|
textAlignment: 'center',
|
|
},
|
|
),
|
|
)
|
|
},
|
|
}
|
|
}
|