Installing scaffolding
Prerequisites: Node installed (above version 4.0), NPM
A, global installation vue-cli
NPM install-g VUE-CLI
After successful installation, you can view the version number from the command line.
B. Initialize Project
Create a new folder named 01vue, prepare to store the project under this folder, and then execute the command line VUE init template type project name, for example:
Vue Init webpack My-vue-project
Vue has a number of template types, such as Webpack, simple, browserify, which are created based on the Webpack project, with a series of interaction issues after the carriage return:
The name of the project, the description of the project, whether to install Vue-router (for page jumps), whether to use Eslint (a tool for code detection, to avoid low-level errors and Uniform code style), whether to install unit tests, etc.
You can enter the end, or you can choose, for example:
You can then find a folder named My-vue-project folder in 01vue.
C. Startup Project
Follow the prompt command line to start the project
CD my-vue-projectnpm installnpm run Dev
You will then see a folder with a dependent package in the folder Node_modules, and finally enter the address http://localhost:8080 in the browser, you can see the first page ^v^.
Vue.js Frame Construction