Skip to content

Starter template for a multi-page Vue 2 app

License

Notifications You must be signed in to change notification settings

MichaelCurrin/vue-router-quickstart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vue Router Quickstart

Starter template for a multi-page Vue 2 app

GitHub tag License

Made with Node Package - vue Package - vue-router

Preview

Sample 1

Sample 2

About

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:

  • MichaelCurrin - vue-quickstart

For a Vue 3 project using Vue Router and slash-based paths.

  • MichaelCurrin - vue-slash-routes-quickstart

Requirements

Installation

How to setup the app locally

Install system dependencies

Install Node.js and Yarn - see these gist instructions.

Clone

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

Install Node packages.

$ yarn install

Recommended extensions

To add syntax highlighting of .vue files in VS Code, install an extension such as Vetur.

Usage

How to run the app locally

Run

Compile and start a hot-reloading dev server.

$ yarn serve

Open in the browser:

Build

Compile and minify for production.

$ yarn build

View the output in the unversioned dist directory.

Lint and fix

$ yarn lint

Add Prettier support:

  • Install prettier
  • Add @vue/prettier to eslintConfig extends in package.json.

Customize configuration

See Configuration Reference.

License

Released under MIT.