Installing Vue-CLI
In this chapter, you will be using Vue’s command line tool, vue-cli
. To get started with vue-cli
, run the following commands:
npm install -g vue-cli vue init <template> <project-name> cd <project-name> npm install npm run dev
This chapter will be using the webpack-simple template. This is one of many templates that you can choose to download when creating your Vue application with vue-cli
. Make sure you replace <template>
with webpack-single
during the vue-cli
setup. This chapter is also going to make use of Vue-Router to easily handle navigating between “pages” on the dashboard. Routing is essential for every single page application. With it, you can mount a single parent component with its child components based on a URL.
Note: There are a total of six different templates to choose from with the CLI. To find out what they include check out the Vue CLI github repo.
Before you jump into setting everything up, there are...