It is a very popular front-end framework, designed using MVVM pattern, and is built with the idea of data-driven and componentization. In contrast, it provides a simpler and easier to understand API, which allows us to quickly get started and use it, especially suitable for single-page applications development.
It is data-driven. It binds the DOM and data through some special syntax without manually operating the DOM. Once a binding is created, the DOM will remain synchronized with the data, and whenever the data is changed, the DOM will be updated accordingly.
1. Install NPM
1.1 latest stable version:
npm install vue
2. Command line tool installation
The speed is slow in China, use Taobao mirror:
npm install -g cnpm --registry=
Note: In the future, replace the place where npm is used with cnpm
1. Install vue-vli globally
cnpm install -g vue-cli
2. Create a new project based on webpack templates
vue init webpack my-project
After entering the installation command, wait for a while and prompt for input:
2.1 Project name:
2.2 Project Description:
2.3 Author:
2.4 Whether to use ESlint: (You can choose not to, ESlint is a set of syntax checking tools)
2.5 Whether unit testing is required: (can choose not to be required)
illustrate:
webpack: project type, use webpack templates for compression and packaging.
my-project: project name.
3. Installation dependency
3.1 Enter the project:
cd my-project
3.2 Installation dependencies:
cnpm install
illustrate:
3.2.1 will install the dependencies into the project node_modules folder.
3.2.2 You can use the cnpm command because webpack has installed the corresponding dependencies.
3.2.3 Document Description:
Mainly includes: project description and related dependencies.
3.3 Run the project:
cnpm run dev
By accesshttp://127.0.0.1:8080Access the running project.
3. Reference link
Vuejs official website:/v2/guide/
Taobao mirror:/
Summarize
The above is the Vuejs development environment construction and hot updates introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to everyone in time. Thank you very much for your support for my website!