Skip to content

Commit 70680d7

Browse files
authored
docs: setup vitepress (#507)
* docs: install vitepress * docs: update docs config for vitepress
1 parent 53c0535 commit 70680d7

File tree

6 files changed

+944
-67
lines changed

6 files changed

+944
-67
lines changed

docs/.vitepress/config.js

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
module.exports = {
2+
title: 'Vue Class Component',
3+
description:
4+
'ECMAScript / TypeScript decorator for class-style Vue components',
5+
6+
themeConfig: {
7+
repo: 'vuejs/vue-class-component',
8+
docsDir: 'docs',
9+
editLinks: true,
10+
11+
nav: [
12+
{
13+
text: 'Guide',
14+
link: '/',
15+
},
16+
{
17+
text: 'API Reference',
18+
link: '/api/',
19+
},
20+
],
21+
22+
sidebar: {
23+
'/api/': [
24+
{
25+
text: 'API Reference',
26+
link: '/api/',
27+
},
28+
],
29+
30+
'/': [
31+
{
32+
text: 'Overview',
33+
link: '/',
34+
},
35+
{
36+
text: 'Installation',
37+
link: '/guide/installation.html',
38+
},
39+
{
40+
text: 'General Guide',
41+
collapsable: false,
42+
children: [
43+
{
44+
text: 'Class Component',
45+
link: '/guide/class-component.html',
46+
},
47+
{
48+
text: 'Additional Hooks',
49+
link: '/guide/additional-hooks.html',
50+
},
51+
{
52+
text: 'Custom Decorators',
53+
link: '/guide/custom-decorators.html',
54+
},
55+
{
56+
text: 'Extend and Mixins',
57+
link: '/guide/extend-and-mixins.html',
58+
},
59+
{
60+
text: 'Caveats of Class Component',
61+
link: '/guide/caveats.html',
62+
},
63+
],
64+
},
65+
{
66+
text: 'TypeScript Guide',
67+
collapsable: false,
68+
children: [
69+
{
70+
text: 'Props Definition',
71+
link: '/guide/props-definition.html',
72+
},
73+
{
74+
text: 'Property Type Declaration',
75+
link: '/guide/property-type-declaration.html',
76+
},
77+
{
78+
text: '$refs Type Extension',
79+
link: '/guide/refs-type-extension.html',
80+
},
81+
{
82+
text: 'Hooks Auto-complete',
83+
link: '/guide/hooks-auto-complete.html',
84+
},
85+
],
86+
},
87+
],
88+
},
89+
},
90+
}

docs/.vuepress/config.js

Lines changed: 0 additions & 52 deletions
This file was deleted.
File renamed without changes.
File renamed without changes.

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@
2525
"test:ts": "jest",
2626
"test:babel": "cross-env BABEL_TEST=1 jest",
2727
"test:dts": "tsc -p ./test-dts",
28-
"docs:dev": "vuepress dev docs",
29-
"docs:build": "vuepress build docs",
28+
"docs:dev": "vitepress dev docs",
29+
"docs:build": "vitepress build docs",
30+
"docs:serve": "vitepress serve docs",
3031
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
3132
"release": "bash scripts/release.sh"
3233
},
@@ -75,6 +76,7 @@
7576
"ts-loader": "^8.0.2",
7677
"typescript": "^4.0.2",
7778
"uglify-es": "^3.3.9",
79+
"vitepress": "^0.11.4",
7880
"vue": "^3.0.0",
7981
"vue-loader": "^16.1.1",
8082
"webpack": "^4.44.1",

0 commit comments

Comments
 (0)