Skip to content

Commit 5b5319d

Browse files
authored
docs: move to VuePress (#627)
1 parent 8294453 commit 5b5319d

File tree

430 files changed

+3225
-13479
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

430 files changed

+3225
-13479
lines changed

.circleci/config.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ jobs:
1717
steps:
1818
- checkout
1919
- *restore_node_modules
20+
- run:
21+
name: remove vuepress from dependencies
22+
command: sed -i '/vuepress/ d' package.json
2023
- run:
2124
name: yarn --version
2225
command: yarn --version

docs/.vuepress/_redirects

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/en/* /:splat
2+
3+
/api/mount /api/#mount
4+
/api/shallowMount /api/#shallowmount
5+
/api/createLocalVue /api/#createlocalvue
6+
/api/config /api/#config
7+
8+
/api/wrapper/* /api/wrapper.html/#:splat
9+
/api/wrapper-array/* /api/wrapper-array.html/#:splat
10+
11+
/ja/api/mount /ja/api/#mount
12+
/ja/api/shallowMount /ja/api/#shallowmount
13+
/ja/api/createLocalVue /ja/api/#createlocalvue
14+
/ja/api/config /ja/api/#config
15+
16+
/ja/api/wrapper/* /ja/api/wrapper.html/#:splat
17+
/ja/api/wrapper/* /ja/api/wrapper.html/#:splat
18+
/ja/api/wrapper-array/* /ja/api/wrapper-array.html/#:splat
19+
20+
/zh/api/mount /zh/api/#mount
21+
/zh/api/shallowMount /zh/api/#shallowmount
22+
/zh/api/createLocalVue /zh/api/#createlocalvue
23+
/zh/api/config /zh/api/#config
24+
25+
/zh/api/wrapper/* /zh/api/wrapper.html/#:splat
26+
/zh/api/wrapper-array/* /zh/api/wrapper-array.html/#:splat

docs/.vuepress/config.js

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
module.exports = {
2+
locales: {
3+
'/': {
4+
lang: 'en-US',
5+
title: 'Vue Test Utils',
6+
description: 'Utilities for testing Vue components'
7+
},
8+
'/ja/': {
9+
lang: 'ja',
10+
title: 'Vue Test Utils',
11+
description: 'Vue コンポーネントをテストするためのユーティリティ'
12+
},
13+
'/zh/': {
14+
lang: 'zh-CN',
15+
title: 'Vue Test Utils',
16+
description: '测试 Vue 组件的实用工具'
17+
}
18+
},
19+
serviceWorker: true,
20+
theme: 'vue',
21+
themeConfig: {
22+
repo: 'vuejs/vue-test-utils',
23+
docsDir: 'docs',
24+
locales: {
25+
'/': {
26+
label: 'English',
27+
selectText: 'Languages',
28+
editLinkText: 'Edit this page on GitHub',
29+
nav: [
30+
{
31+
text: 'API',
32+
link: '/api/'
33+
},
34+
{
35+
text: 'Guides',
36+
link: '/guides/'
37+
}
38+
],
39+
sidebar: [
40+
'/',
41+
'/guides/',
42+
'/api/',
43+
'/api/wrapper/',
44+
'/api/wrapper-array/',
45+
'/api/options',
46+
'/api/components/'
47+
]
48+
},
49+
'/zh/': {
50+
label: '简体中文',
51+
selectText: '选择语言',
52+
editLinkText: '在 GitHub 上编辑此页',
53+
nav: [
54+
{
55+
text: 'API',
56+
link: '/zh/api/'
57+
},
58+
{
59+
text: '教程',
60+
link: '/zh/guides/'
61+
}
62+
],
63+
sidebar: [
64+
'/zh/',
65+
'/zh/guides/',
66+
'/zh/api/',
67+
'/zh/api/wrapper/',
68+
'/zh/api/wrapper-array/',
69+
'/zh/api/options',
70+
'/zh/api/components/'
71+
]
72+
},
73+
'/ja/': {
74+
label: '日本語',
75+
selectText: '言語',
76+
editLinkText: 'GitHub 上でこのページを編集する',
77+
nav: [
78+
{
79+
text: 'API',
80+
link: '/ja/api/'
81+
},
82+
{
83+
text: 'ガイド',
84+
link: '/ja/guides/'
85+
}
86+
],
87+
sidebar: [
88+
'/ja/',
89+
'/ja/guides/',
90+
'/ja/api/',
91+
'/ja/api/wrapper/',
92+
'/ja/api/wrapper-array/',
93+
'/ja/api/options',
94+
'/ja/api/components/'
95+
]
96+
}
97+
}
98+
},
99+
markdown: {
100+
config: md => {
101+
// use more markdown-it plugins!
102+
md.use(require('markdown-it-include'))
103+
}
104+
}
105+
}

docs/LANGS.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

docs/en/README.md renamed to docs/README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
# Vue Test Utils
1+
# Introduction
22

33
Vue Test Utils is the official unit testing utility library for Vue.js.
44

5-
## Table of Contents
6-
7-
* [Guides](guides/README.md)
8-
* [Getting Started](guides/getting-started.md)
5+
* [Guides](./guides/README.md)
6+
* [Getting Started](./guides/getting-started.md)
97
* [Common Tips](guides/common-tips.md)
108
* [Mouse, Key and other DOM Events](guides/dom-events.md)
119
* [Choosing a test runner](guides/choosing-a-test-runner.md)

docs/api/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# API
2+
3+
!!!include(docs/api/mount.md)!!!
4+
!!!include(docs/api/shallowMount.md)!!!
5+
!!!include(docs/api/render.md)!!!
6+
!!!include(docs/api/renderToString.md)!!!
7+
!!!include(docs/api/selectors.md)!!!
8+
!!!include(docs/api/createLocalVue.md)!!!
9+
!!!include(docs/api/config.md)!!!

docs/api/components/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Components
2+
3+
Vue Test Utils includes utility components you can use to stub components.
4+
5+
!!!include(docs/api/components/RouterLinkStub.md)!!!
6+
!!!include(docs/api/components/TransitionStub.md)!!!
7+
!!!include(docs/api/components/TransitionGroupStub.md)!!!

docs/en/api/components/RouterLinkStub.md renamed to docs/api/components/RouterLinkStub.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# `RouterLinkStub`
1+
## RouterLinkStub
22

33
A component to stub the Vue Router `router-link` component.
44

docs/en/api/components/TransitionGroupStub.md renamed to docs/api/components/TransitionGroupStub.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# `TransitionGroupStub`
1+
## TransitionGroupStub
22

33
A component to stub the `transition-group` component. Instead of performing transitions asynchronously, it returns the child components synchronously.
44

@@ -28,4 +28,4 @@ mount(Component, {
2828
'transition-group': TransitionGroupStub
2929
}
3030
})
31-
```
31+
```

docs/en/api/components/TransitionStub.md renamed to docs/api/components/TransitionStub.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# `TransitionStub`
1+
## TransitionStub
22

33
A component to stub the `transition` component. Instead of performing transitions asynchronously, it returns the child component synchronously.
44

0 commit comments

Comments
 (0)