How to install vue.cli scaffolding: first install the node environment; then install the code [npm install -g vue-cli] and install the plug-in; then install the project dependencies; finally run the project, the code is [npm run dev].
The operating environment of this tutorial: Windows 7 system, Vue version 2.9.6. This method is suitable for all brands of computers.
How to install vue.cli scaffolding:
1. Before installation, check whether the node environment has been installed. If so, we will proceed with the next installation of vue-cli. , if not, we will install the node environment first.
2. Install vue-cli scaffolding. The installation code is: npm install -g vue-cli
. What we choose here is global installation. After installation, create the project.
3. Then choose whether to install the plug-in according to the prompts. If it is installed, select Yes. If it is not installed, select No. Until the plug-in selection is completed.
4. After that, we cd to switch to the project directory, and then install the project dependencies. The installation code of the project dependencies is: npm install
5. After the dependency installation is completed, our scaffolding is basically installed. Let’s take a look at what files our project has.
# 6. After all the prelude preparations are completed, our vue-cli scaffolding is completed, and we will start the project next. The code is: npm run dev
7. After the scaffolding is run, port 8080 will be opened by default. If the system automatically jumps to the web page, it will It means that our scaffolding installation has been completed, and then we can fill in our projects in the scaffolding.
Related learning recommendations (free): javascript learning tutorial
The above is the detailed content of How to install vue.cli scaffolding. For more information, please follow other related articles on the PHP Chinese website!