Vue project development---initialize the project and use gitee to host

1. Create a project using CLI3

vue create 项目名称


The above figure indicates that the current system installation scaffolding version is 2.9.6. Therefore, you need to uninstall the old version of the scaffolding, and then install the corresponding new version of the scaffolding.

//卸载脚手架
npm uninstall -g @vue/cli

//安装指定版本脚手架
npm install -g @vue/cli@3.2.1

If you encounter the following error during the installation process:
insert image description here
just find a .vuerc file in the local user's directory C:\Users\Lenoev and delete it and it will be OK
insert image description here
insert image description here

2. Establish a link between the local project and the remote warehouse

2.1. The premise of the following operations is that a warehouse has been created on the gitee remote, and then the local files are submitted to the remote

First, create a new folder supermail
locally and copy and paste some folders and files (except node_modules and .git) under the folder supermail1 in the project created with vue scaffolding in step 1 into supermail.

2.2, establish links

Open the eye-catching with webstrom and enter the supermal folder
insert image description here

2.3. View the git status of the local project

git status

insert image description here

2.4. Temporarily store the code in the local warehouse

git add .

insert image description here

2.5. Submit the code to the local warehouse

git commit -m '初始化'

insert image description here

2.6. Submit code to this remote warehouse

git push

insert image description here

2.6. Successful submission

insert image description here

3. Establish a link between the project created locally using vueCLI3 and the remote warehouse

  • A successfully created project with scaffolding 3 should have a .git file
  • First, create an empty warehouse remotely (no readme, open source protocol, etc. files), that is, without any folders and files.

empty warehouse
insert image description here

3.1. Use the development tool to open the project created with scaffolding 3

Enter the following commands in sequence

git remote add origin https://gitee.com/beginner01/test.git

git push -u origin "master"

insert image description here

3.2. The code is submitted successfully

insert image description here

Guess you like

Origin blog.csdn.net/qq_46112274/article/details/123770058