Starter template for a multi-page Vue 2 app
This project was generated using the GUI invoked by this command:
$ npx @vue/cli ui
The router option was enabled there to set up the Home and About pages - Project plugins then Add vue-router.
You can also use this to add Vue Router to an existing project.
$ vue add router
To create a simpler project without Vue Router, see:
For a Vue 3 project using Vue Router and slash-based paths.
How to setup the app locally
Install Node.js and Yarn - see these gist instructions.
Clone the repo - or your own repo generated from the template
$ git clone [email protected]:MichaelCurrin/vue-router-quickstart.git
$ cd vue-router-quickstart
Install Node packages.
$ yarn install
To add syntax highlighting of .vue
files in VS Code, install an extension such as Vetur.
How to run the app locally
Compile and start a hot-reloading dev server.
$ yarn serve
Open in the browser:
Compile and minify for production.
$ yarn build
View the output in the unversioned dist
directory.
$ yarn lint
Add Prettier support:
- Install
prettier
- Add
@vue/prettier
toeslintConfig
extends
inpackage.json
.
Released under MIT.