Skip to content

docs: Add warning on docs version #1792

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions docs/.vuepress/theme/Layout.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<template>
<ParentLayout>
<template #page-top>
<div class="warning-wrapper">
<div class="custom-block warning vue3-warning">
<p>
You’re browsing the documentation for Vue Test Utils for Vue v2.x
and earlier.
</p>
<p>
To read docs for Vue Test Utils for Vue 3,
<a
href="https://next.vue-test-utils.vuejs.org/introduction/"
v-text="'click here'"
/>.
</p>
</div>
</div>
</template>
<Content />
</ParentLayout>
</template>

<script>
import ParentLayout from '@parent-theme/layouts/Layout.vue'

export default {
name: 'Layout',

components: {
ParentLayout
}
}
</script>

<style lang="css">
.warning-wrapper {
max-width: 740px;
margin: 5rem auto 0;
}

.custom-block.vue3-warning {
padding: 1rem;
font-size: 0.9rem;
}

.custom-block.vue3-warning p {
margin: 0;
}

/* Overrides theme's default margin-top values */
.theme-default-content:not(.custom) > h1:first-child {
margin-top: -4.5rem;
}
</style>
3 changes: 3 additions & 0 deletions docs/.vuepress/theme/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extend: '@vuepress/theme-default'
}
11 changes: 7 additions & 4 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
# Introduction

::: warning
This doc is for Vue2.x only. If you want to see docs related to 3.x, please move to [here](https://next.vue-test-utils.vuejs.org/introduction/)
:::

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

This is the documentation for Vue Test Utils v1, which targets Vue 2 and earlier.

In short:

- [Vue Test Utils 1](https://github.com/vuejs/vue-test-utils/) targets [Vue 2](https://github.com/vuejs/vue/).
- [Vue Test Utils 2](https://github.com/vuejs/vue-test-utils-next/) targets [Vue 3](https://github.com/vuejs/vue-next/).

<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>

- [Installation](./installation/)
Expand Down