chore: move init terminal output to separate file

pull/2880/head
Divyansh Singh 10 months ago
parent 39784ca55f
commit 40da45d038

@ -71,24 +71,7 @@ $ pnpm dlx vitepress init
You will be greeted with a few simple questions:
```ansi
┌  Welcome to VitePress!
│
◇ Where should VitePress initialize the config?
│ ./docs
│
◇ Site title:
│ My Awesome Project
│
◇ Site description:
│ A VitePress Site
│
◆ Theme:
│ ● Default Theme (Out of the box, good-looking docs)
│ ○ Default Theme + Customization
│ ○ Custom Theme
└
```
<<< @/snippets/init.ansi
::: tip Vue as Peer Dependency
If you intend to perform customization that uses Vue components or APIs, you should also explicitly install `vue` as a peer dependency.

@ -0,0 +1,16 @@
┌ Welcome to VitePress!
│
◇ Where should VitePress initialize the config?
│ ./docs
│
◇ Site title:
│ My Awesome Project
│
◇ Site description:
│ A VitePress Site
│
◆ Theme:
│ ● Default Theme (Out of the box, good-looking docs)
│ ○ Default Theme + Customization
│ ○ Custom Theme
└

@ -37,7 +37,7 @@ const getPackageManger = () => {
}
export async function init() {
intro(bold(cyan(' Welcome to VitePress! ')))
intro(bold(cyan('Welcome to VitePress!')))
const options: ScaffoldOptions = await group(
{

@ -43,4 +43,5 @@ function extractLang(info: string) {
.replace(/:(no-)?line-numbers({| |$).*/, '')
.replace(/(-vue|{| ).*$/, '')
.replace(/^vue-html$/, 'template')
.replace(/^ansi$/, '')
}

Loading…
Cancel
Save