mirror of
https://github.com/vastxie/99AI.git
synced 2025-09-18 09:46:37 +08:00
26 lines
705 B
TypeScript
26 lines
705 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.github.io')}\n\n当前使用:${cyan('基础版')}`,
|
||
{
|
||
padding: 1,
|
||
margin: 1,
|
||
borderStyle: 'double',
|
||
textAlignment: 'center',
|
||
},
|
||
),
|
||
)
|
||
},
|
||
}
|
||
}
|