Skip to content

Commit 40da45d

Browse files
committed
chore: move init terminal output to separate file
1 parent 39784ca commit 40da45d

File tree

4 files changed

+19
-19
lines changed

4 files changed

+19
-19
lines changed

docs/guide/getting-started.md

+1-18
Original file line numberDiff line numberDiff line change
@@ -71,24 +71,7 @@ $ pnpm dlx vitepress init
7171

7272
You will be greeted with a few simple questions:
7373

74-
```ansi
75-
┌  Welcome to VitePress!
76-
│
77-
◇ Where should VitePress initialize the config?
78-
│ ./docs
79-
│
80-
◇ Site title:
81-
│ My Awesome Project
82-
│
83-
◇ Site description:
84-
│ A VitePress Site
85-
│
86-
◆ Theme:
87-
│ ● Default Theme (Out of the box, good-looking docs)
88-
│ ○ Default Theme + Customization
89-
│ ○ Custom Theme
90-
└
91-
```
74+
<<< @/snippets/init.ansi
9275

9376
::: tip Vue as Peer Dependency
9477
If you intend to perform customization that uses Vue components or APIs, you should also explicitly install `vue` as a peer dependency.

docs/snippets/init.ansi

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
┌ Welcome to VitePress!
2+
│
3+
◇ Where should VitePress initialize the config?
4+
│ ./docs
5+
│
6+
◇ Site title:
7+
│ My Awesome Project
8+
│
9+
◇ Site description:
10+
│ A VitePress Site
11+
│
12+
◆ Theme:
13+
│ ● Default Theme (Out of the box, good-looking docs)
14+
│ ○ Default Theme + Customization
15+
│ ○ Custom Theme
16+
└

src/node/init/init.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const getPackageManger = () => {
3737
}
3838

3939
export async function init() {
40-
intro(bold(cyan(' Welcome to VitePress! ')))
40+
intro(bold(cyan('Welcome to VitePress!')))
4141

4242
const options: ScaffoldOptions = await group(
4343
{

src/node/markdown/plugins/preWrapper.ts

+1
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,5 @@ function extractLang(info: string) {
4343
.replace(/:(no-)?line-numbers({| |$).*/, '')
4444
.replace(/(-vue|{| ).*$/, '')
4545
.replace(/^vue-html$/, 'template')
46+
.replace(/^ansi$/, '')
4647
}

0 commit comments

Comments
 (0)