Skip to content

Commit 1d9d548

Browse files
authored
Docs: Create "Installation" section out of Guide (#1610)
* docs: create section for installation docs * docs(ja): create section for installation docs * docs(ru): create section for installation docs * docs(zh): create section for installation docs * docs: add links to Installation section * docs: fix internal links * docs: fix headings * docs(en): reduce and simplify content on Installation
1 parent 17c2d22 commit 1d9d548

37 files changed

+181
-789
lines changed

Diff for: docs/.vuepress/config.js

+4
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ module.exports = {
5757
],
5858
sidebar: [
5959
'/',
60+
'/installation/',
6061
'/guides/',
6162
'/api/',
6263
'/api/wrapper/',
@@ -81,6 +82,7 @@ module.exports = {
8182
],
8283
sidebar: [
8384
'/zh/',
85+
'/zh/installation/',
8486
'/zh/guides/',
8587
'/zh/api/',
8688
'/zh/api/wrapper/',
@@ -105,6 +107,7 @@ module.exports = {
105107
],
106108
sidebar: [
107109
'/ja/',
110+
'/ja/installation/',
108111
'/ja/guides/',
109112
'/ja/api/',
110113
'/ja/api/wrapper/',
@@ -129,6 +132,7 @@ module.exports = {
129132
],
130133
sidebar: [
131134
'/ru/',
135+
'/ru/installation/',
132136
'/ru/guides/',
133137
'/ru/api/',
134138
'/ru/api/wrapper/',

Diff for: docs/README.md

+1-5
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,11 @@ Vue Test Utils is the official unit testing utility library for Vue.js.
44

55
<div class="vueschool"><a href="https://vueschool.io/courses/learn-how-to-test-vuejs-components?friend=vuejs" target="_blank" rel="sponsored noopener" title="Learn how to use Vue Test Utils to test Vue.js Components with Vue School">Learn how to test Vue.js components with Vue School</a></div>
66

7+
- [Installation](./installation/)
78
- [Guides](./guides/)
89
- [Getting Started](./guides/getting-started.md)
910
- [Common Tips](guides/common-tips.md)
1011
- [Mouse, Key and other DOM Events](guides/dom-events.md)
11-
- [Choosing a test runner](guides/choosing-a-test-runner.md)
12-
- [Testing Single-File Components with Jest](guides/testing-single-file-components-with-jest.md)
13-
- [Testing Single-File Components with Mocha + webpack](guides/testing-single-file-components-with-mocha-webpack.md)
14-
- [Testing Single-File Components with Karma](guides/testing-single-file-components-with-karma.md)
15-
- [Testing in Node.js Without a Build Step](guides/usage-without-a-build-step-node.md)
1612
- [Testing Asynchronous Behavior](guides/testing-async-components.md)
1713
- [Using with TypeScript](guides/using-with-typescript.md)
1814
- [Using with Vue Router](guides/using-with-vue-router.md)

Diff for: docs/guides/README.md

-5
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@
33
!!!include(docs/guides/getting-started.md)!!!
44
!!!include(docs/guides/common-tips.md)!!!
55
!!!include(docs/guides/dom-events.md)!!!
6-
!!!include(docs/guides/choosing-a-test-runner.md)!!!
7-
!!!include(docs/guides/testing-single-file-components-with-jest.md)!!!
8-
!!!include(docs/guides/testing-single-file-components-with-mocha-webpack.md)!!!
9-
!!!include(docs/guides/testing-single-file-components-with-karma.md)!!!
10-
!!!include(docs/guides/usage-without-a-build-step-node.md)!!!
116
!!!include(docs/guides/testing-async-components.md)!!!
127
!!!include(docs/guides/using-with-typescript.md)!!!
138
!!!include(docs/guides/using-with-vue-router.md)!!!

Diff for: docs/guides/choosing-a-test-runner.md

-48
This file was deleted.

Diff for: docs/guides/getting-started.md

+2-49
Original file line numberDiff line numberDiff line change
@@ -4,56 +4,9 @@
44

55
### Setup
66

7-
To get a quick taste of using Vue Test Utils, clone our demo repository with basic setup and install the dependencies:
7+
If you already have a project that was created with the [Vue CLI](https://cli.vuejs.org/), you might want to add and configure the [core Jest plugin](https://cli.vuejs.org/core-plugins/unit-jest.html) or the [core Mocha plugin](https://cli.vuejs.org/core-plugins/unit-mocha.html).
88

9-
```bash
10-
git clone https://github.com/vuejs/vue-test-utils-getting-started
11-
cd vue-test-utils-getting-started
12-
npm install
13-
```
14-
15-
If you already have a project that was created with the [Vue CLI](https://cli.vuejs.org/) and want to add testing capabilities you may run:
16-
17-
```bash
18-
# unit testing
19-
vue add @vue/unit-jest
20-
21-
# or:
22-
vue add @vue/unit-mocha
23-
24-
# end-to-end
25-
vue add @vue/e2e-cypress
26-
27-
# or:
28-
vue add @vue/e2e-nightwatch
29-
```
30-
31-
You will see that the project includes a simple component, `counter.js`:
32-
33-
```js
34-
// counter.js
35-
36-
export default {
37-
template: `
38-
<div>
39-
<span class="count">{{ count }}</span>
40-
<button @click="increment">Increment</button>
41-
</div>
42-
`,
43-
44-
data() {
45-
return {
46-
count: 0
47-
}
48-
},
49-
50-
methods: {
51-
increment() {
52-
this.count++
53-
}
54-
}
55-
}
56-
```
9+
If needed, check out the [Installation guides](../installation/README.md) for further details.
5710

5811
### Mounting Components
5912

Diff for: docs/guides/testing-single-file-components-with-jest.md

-219
This file was deleted.

0 commit comments

Comments
 (0)