Home > Article > Web Front-end > What is vue scaffolding
vue scaffolding refers to vue-cli, which is a specialized scaffolding for quickly building complex scaffolding for single-page applications. It can easily create new applications and can be used to automatically generate vue and webpack Project template.
Vue is a progressive framework for building user interfaces. It can be applied layer by layer from bottom to top. Vue's core library only focuses on the view layer, which is not only easy to get started, but also easy to integrate with third-party libraries or existing projects. On the other hand, when combined with a modern tool chain and various supporting class libraries, Vue is fully capable of providing drivers for complex single-page applications. Next, we will introduce an important content in Vue, vue-cli, which has certain Reference value, I hope it will be helpful to everyone.
[Recommended course: Vue.js tutorial]
What is vue-cli
vue-cli is an official cli provided by Vue, which is designed to quickly build complex scaffolding for single-page applications. It is a project template for automatically generating vue.js webpack and provides batteries-included build settings for modern front-end workflows. It only takes a few minutes to be up and running with hot reloading, lint verification on save, and a production-ready build
Use of vue-cli
(1) Install vue-cli
Open the terminal window and open cmd (win R shortcut key) and enter the following content
npm install -g @vue.cli
In this article We need to install vue-cli version 3 or higher. If you want to check the version, you can enter the following command
vue --version
If the installed version is lower than version 3, you need to install the latest version
(3) Create a custom project
Like Angular and React CLI, Vue’s CLI makes it easy to create new applications. The coolest feature of the Vue method is that you can get a boilerplate project customized according to your goals
Enter the following in the terminal:
vue create my-app
This is where the CLI will let you choose whether to convert one of the presets Whether to use babel or eslint, or manually choose the features to use. If you choose Manual, you will see the following screen
When you answer all questions Vue will download and install everything you need. From there you can go into the directory and run npm run serve to view the project, or open it in your editor. The image below shows what your scaffolding project might look like if you selected many or all of the available features.
Summary: The above is the entire content of this article. I hope that this article can help everyone understand the relevant knowledge of vue-cli.
The above is the detailed content of What is vue scaffolding. For more information, please follow other related articles on the PHP Chinese website!