mirror of
https://github.com/zyycn/codex-proxy-rs.git
synced 2026-11-29 00:01:06 +00:00
28 lines
806 B
TypeScript
28 lines
806 B
TypeScript
import type { Plugin } from 'vite'
|
|
|
|
const banner = `
|
|
██████╗ ██████╗ ██████╗
|
|
██╔════╝ ██╔══██╗ ██╔══██╗
|
|
██║ ██████╔╝ ██████╔╝
|
|
██║ ██╔═══╝ ██╔═██╗
|
|
╚██████╗ ██║ ██║ ██╗
|
|
╚═════╝ ╚═╝ ╚═╝ ╚═╝
|
|
|
|
https://github.com/zyycn/codex-proxy-rs`
|
|
|
|
export function consoleBanner(): Plugin {
|
|
return {
|
|
name: 'cpr-console-banner',
|
|
transformIndexHtml: {
|
|
order: 'pre',
|
|
handler: () => [
|
|
{
|
|
tag: 'script',
|
|
attrs: { type: 'module' },
|
|
children: `console.info(${JSON.stringify(banner)})`,
|
|
},
|
|
],
|
|
},
|
|
}
|
|
}
|