VUEJS development environment Construction and heat update

Source: Internet
Author: User
Tags install node

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.