Install node JS to the simple process of running Vue
1. Install node JS
:http://nodejs.cn/download/
2. Run node. js Command PromptAfter installation is complete (node-v View installed version)
3, install NPM (since the current version of Nodejs has integrated NPM so there is no need to install, you can use npm-v to view the version)
4, register CNPM to replace NPM
Using the command:npm install cnpm-g--registry=https://registry.npm.taobao.org
5. Installing Vue Scaffolding VUE-CLI
Command:npm install-g vue-cli
after successful installation, you can view the Vue version with vue-v
6, CD to the corresponding directory under the initialization of VUE project
command:vue init webpack my-project
Project Name Item name
Project Description Item Name Description
Author Author Email
use ESLint to lint your code? Eslist Syntax Check required
Setup unit tests with Karma + Mocha? Unit Test Required
Setup e2e tests with Nightwatch? Yes if you need e2e test
7,Package.json for the project depends on resources, if you want to run this project requires the use of cnpm install dependencies
8. Using the command npm run dev startup project, the browser will open http://localhost:8080/#/see the following effects
Development is a hot deployment state, the browser automatically refreshes after the code is saved, and the error message is very friendly.
9. Compiling and packaging NPM Run Build
The package will be compiled into the Project Dist folder
Wanglu Date: 2017/6/21
Node JS build a Vue and start it