It is recommended to use the Official command line tool, which can be used to quickly build a large single page application. It takes only a minute to launch a build configuration item with hot reload, save-time static check, and a production environment.
1. Install node https://nodejs.org/en/download/
Because some NPM resources are blocked or is a source of foreign resources, often lead to the use of NPM to install the dependency package failure, all I also need NPM's domestic mirror---cnpm.
On the command line: NPM install-g cnpm--registry=https://registry.npm.taobao.org Enter, approximately 2 minutes, if error or unresponsive, remove node. JS Reinstallation
2. Install git Https://git-scm.com/download/win
3, install the global vue-cli Scaffolding, to help build the necessary template framework.
Input command: CNPM install-g vue-cli Enter wait complete-G is the meaning of the global installation
4. Create a project
First we want to select the directory, and then on the command line to move the directory to the selected directory,
If we are going to create a new project in the Vue folder under E, enter the following command: E: Enter, then CD vue,
Then enter the command:Vue init webpack project folder name , enter,
Running the initialization command will allow the user to enter a few basic options, such as project name, description, author and other information, if you do not want to fill in the direct enter the default is good. (A return to the +n button is completed)
5. The dependent packages required for the installation of the project
First Enter: CD project name return, then enter: cnpm Install enter wait for installation,
Once the installation is complete, a Node_modules folder is created in our project directory Firstvue folder, which is the dependent package resource that our project needs. Once you have installed the dependencies, you can run the entire project.
6. Whether the test environment is built successfully
In cmd enter: cnpm run dev Enter, after the project is successfully run, the browser will automatically open localhost:8080 (if the browser does not open automatically, you can enter manually). After successful operation, you will see the Welcome to Your vue.js App page.
VUEJS development environment Construction and heat update