vue-router README

The project's README from github.com/vuejs/vue-router. As one markdown file: README.md.

vue-router Build Status

This is vue-router 3.0 which works only with Vue 2.0. and both have reached end of life.

Supporting Vue Router

Vue Router is part of the Vue Ecosystem and is an MIT-licensed open source project with its ongoing development made possible entirely by the support of Sponsors. If you would like to become a sponsor, please consider:

Gold Sponsors

VueJobs

Silver Sponsors

VueMastery Prefect

Bronze Sponsors

Stanislas Ormières Antony Konstantinidis Storyblok NuxtJS


Get started with the documentation, or play with the examples (see how to run them below).

Development Setup

# install deps
yarn

# build dist files
yarn build

# serve examples at localhost:8080
yarn dev

# lint & run all tests
yarn test

# serve docs at localhost:8080
yarn docs

Releasing

Questions

For questions and support please use the Discord chat server or the official forum. The issue list of this repo is exclusively for bug reports and feature requests.

Issues

Please make sure to read the Issue Reporting Checklist before opening an issue. Issues not conforming to the guidelines may be closed immediately.

Contribution

Please make sure to read the Contributing Guide before making a pull request.

Changelog

Details changes for each release are documented in the CHANGELOG.md file.

Stay In Touch

License

MIT

Copyright (c) 2013-present Evan You

Special Thanks

BrowserStack Logo

Special thanks to BrowserStack for letting the maintainers use their service to debug browser specific issues.

vue-router (vuejs/vue-router)

Searching Database…

Что это такое?Это vue-router 3.x — официальный роутер для Vue 2: он сопоставляет URL с компонентами, чтобы одностраничное приложение на Vue 2 могло переключаться между экранами. Входит в экосистему Vue (Vue Ecosystem).
Это приложение, которое я запускаю, или библиотека, которую я подключаю к своему проекту?Это JavaScript-библиотека, а не отдельное приложение: её устанавливают в проект на Vue 2, где она встраивается в экосистему Vue вместе с самим Vue.
Как добавить её в своё приложение на Vue 2?Установите пакет vue-router из npm (линия 3.x) и следуйте документации, ссылка на которую есть в README; в репозитории также есть готовые примеры, которые можно запустить локально.
Нужно ли что-то ещё, кроме самого Vue?Нет, только сам Vue 2 — линия 3.x рассчитана на работу с Vue 2.0, а npm-пакет не тянет за собой никаких собственных зависимостей во время выполнения.
Vue 2 больше не поддерживается — стоит ли брать его для нового проекта?Для новых проектов — нет: и vue-router 3, и Vue 2 достигли конца жизненного цикла. Для приложений на Vue 3 используйте Vue Router 4 из репозитория vuejs/router; эта линия остаётся для уже существующих приложений на Vue 2.
Как запустить примеры, которые идут с репозиторием?Выполните yarn run dev — он запускает node examples/server.js и раздаёт примеры приложений локально. Продакшен-сборка dist собирается командой yarn run build.
Что входит в работу над самим роутером?Команда yarn run test последовательно запускает ESLint, проверки Flow, юнит-тесты Jasmine и Node-раннер e2e-тестов — то есть одной командой проверяется стиль кода, типы и работоспособность ваших изменений.
Creator
vuejs
Size
13.1 MB
Stars
18.9K
Age
12y
Commits · 90 Days