Above one we have successfully installed nodejs, and equipped with npm global environment variable, then this section we take a formal installation vue-cli, then run our vue project developer tools in the webstorm.
In this section, there are two ways to create a project vue
- 1, created via the command line npm
- 2, by webstorm to create a key project
Ready to work
- 1, before we create a project, you need to make sure nodejs has been successfully installed, if you have not installed npm global environment variable is not configured, you can refer to the "Installation and Configuration nodeJs npm global environment variables"
- 2, due to the three parties rely on the domestic installation with npm, slow, I suggest that you configured the domestic mirroring configuration as follows. Only need to perform the following operation can cmd in the command line window
npm config set registry https://registry.npm.taobao.org
First, create a project using the command line vue way
-
1, the desktop create an empty folder, such as vue0117
Into this folder, and then at the top of the address bar, type cmd, and then the Enter key to quickly open the dos command line and navigate to the current directory.
-
2, then execute the following command line installation vue-cli.
npm install -g vue-cli
Wait for the installation
Following completion of the installation, shown here vue-cli version number, which represents the completion of the installation
- 3, using a template to create a vue project webpack
vue init webpack my-project
As project called vue001
At the following several interrogation item, according to the operation shown by the arrow directly to
Download the required class library project
After the project is created, as follows
-
4, cd vue001 into the project directory
-
5, the implementation of npm install the required library download download
Download completed
-
6, webstorm open project, click on the file, then click open
Import vue project just created
-
7, run the project
After the project is successful, open the following link in your browser
Here successfully created and run on behalf of the project.
Second, the use webstorm a key project to create vue
-
1, click on the file, then new, then click on the project
-
2, building project
-
3, wait for the project to create and load the library
May be more time-consuming long, be patient. . . .
-
3, above the building, you can browse and run the project
Here, two ways to create a way vue project are finished, I will be back to record a special video to explain. Stay tuned.