99AI/admin/vite/plugins/app-info.ts
2025-05-31 02:28:46 +08:00

26 lines
705 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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',
},
),
)
},
}
}