Create and run a vue project ② - create a project

foreword

See the environment configuration part: http://t.csdn.cn/YBNNm

Refer to the official document https://cn.vuejs.org/guide/quick-start.html

vscode download address: vscode

①Execute create-vue

Enter at the command prompt: npm init vue

This command will install and execute create-vue .

You will see the following commands in turn, enter your project name and choose whether you want to add other plugins or templates.

This way you create your own project.

② Next, find the address of your project.

In the command prompt type: cd your project name.

For example, my project is called mypj1, then I enter cd mypj1.

③Open and run this project in vscode.

Open vscode and perform the following operation.

In the pop-up window, select the project you just created.

This is the project structure after opening. APP.vue here is the entry of the whole vue project, open it.

Enter npm i in the console at the bottom of the screen and press Enter. This step is to install the required dependencies.

After the installation is complete, continue to enter npm run dev in the console and press Enter, and you will see the following screen.

Copy the url in the red box to the browser and open it, you can see the initial page of the vue project we created, and the vue project will run successfully here!

Guess you like

Origin blog.csdn.net/defined_/article/details/129700208