1. Introduction
The Nuggets have had many articles dedicated to this document contributed only to Aries 999
2. Environment construction
2.1 installation node. Js
-
You can install it all the way back to king of Glory without luna’s high-end operation
-
Checking node Version
- Check the NPM version
- Install development dependencies –save-dev short -d
- Install project dependencies –save short -s
- Short for download package instruction install I
- -g (for example, mp2, yarn, Vue-cli, you can use -g if it can be used in any directory)
- Install YARN in the global environment to improve the download speed NPM i-g YARN
2.2 installation Vue – cli
-
Vue-cli official website address
-
Install the vue – cli
- Check vuE-CLI version
- Vue create [project name] (the current project name cannot have uppercase letters)
- Select VUE to create the project configuration
> Default // This is the default version of some simple plug-ins such as vue-Router and Vuex
Default (Vue 3 Preview) // Is a version identifier (preview version)
Manually select features // The handwriting selection configuration is now used to create projects
// There are also some options that I don't have here. This should be the first time you create a project. If you save the last selected configuration as yes, you will be given a configuration option by default
Copy the code
- Manually select features (press Enter to select the desired development environment plug-in configuration)
- Vue2 or Vue3 version development (it is recommended to choose 2 if it is the back end, if it is the front end)
- Vue2 version explanation (the first code specification currently under development is recommended)
- Unit tests (the first is recommended)
>(*) Lint on save // Save to check
() Lint and fix on commit // Check at fix and commit time
Copy the code
- It’s going to ask you where to put configuration files like Babel, postCSS, ESLint and I’m always going to pick the first one here and I can pick whatever I want
> In dedicated config files // Separate file placement
In package.json / / put the package in json
Copy the code
- If you choose Y, the next creation will have an extra name you fill in here. I like to manually select the configuration because OF cleanliness
- Download the dependent
- Complete and start the project