Vue3.0 environment construction is easy to get started

1. Install Node on the official website (the left is the long-term support version, the right is the current release version)

 Check if the installation is successful

Open cmd->node -v to view the node version

Node contains npm (package manager), check the version

2. Install the Taobao image npm install -g cnpm -- registry=https://registry.npm.taobao.org

 Check if the installation is successful

 3.vue environment cnpm i -g vue @vue/cli

 Make sure that all 35 tasks are completed before the download is successful. Otherwise, enter the command again and execute it again.

 4. Create a vue project in cmd and make relevant configurations

Do not click Enter when selecting, use "space", and click Enter when you have finished selecting.

The creation is successful. Open VSCode, import the created todolist folder to the taskbar, and then start the project npm run serve in the terminal. Port 8080 is opened by default.

 5. Understand the vue project

node_modules: store various dependencies
public
    favicon.ico: vue icon
    index.html: final summary file
src
    assets: store static resources
    components: store general components
    router: configure routing
    store: configure status management
    views: place routing components
    App.vue: Follow the component
    main.js: entry js
file.browerslistrc: manage browser version.gitignore
: upload git configuration file
babel.comfig.js: configure babel
package-lock.json: specific information of all packages
package.json: package management file , including project name, project version, whether it is private, startup script, installed dependencies
README.md: project introduction

Guess you like

Origin blog.csdn.net/hongyinvjianke/article/details/129568141
Recommended