app-info.ts 821 B

12345678910111213141516171819202122232425
  1. import boxen from 'boxen'
  2. import picocolors from 'picocolors'
  3. import type { Plugin } from 'vite'
  4. export default function appInfo(): Plugin {
  5. return {
  6. name: 'appInfo',
  7. apply: 'serve',
  8. async buildStart() {
  9. const { bold, green, cyan, bgGreen, underline } = picocolors
  10. // eslint-disable-next-line no-console
  11. console.log(
  12. boxen(
  13. `${bold(green(`${bgGreen('tg机器人 v3.4.1')}`))}\n${cyan('在线文档:')}${underline('https://continew.top')}\n${cyan('常见问题:')}${underline('https://continew.top/faq.html')}\n${cyan('持续迭代优化的前后端分离中后台管理系统框架。')}`,
  14. {
  15. padding: 1,
  16. margin: 1,
  17. borderStyle: 'double',
  18. textAlignment: 'center',
  19. },
  20. ),
  21. )
  22. },
  23. }
  24. }