Vue2.0, Vue-cli project configuration
-
-
- Step 1, open the folder, enter cmd in the navigation bar, and open the command line window
- Step 2, enter the command
- Step 3, select the third custom new project
- Step 4, select the required project module, select the blank space, and press Enter
- Step 5, select the version of Vue.js to start the project, 2.0, press Enter
- Step 6, whether to use history mode routing, press Enter
- Step 7, select CSS preprocessor, select Enter
- Step 8, where to put the configuration of babel, postcss, eslint
- Step nine, do you want to save this as a preset for future projects? (yes/no) y will do!
-
Step 1, open the folder, enter cmd in the navigation bar, and open the command line window
Step 2, enter the command
//demo是项目名称
vue create demo
Step 3, select the third custom new project
Step 4, select the required project module, select the blank space, and press Enter
- Select the space, and then press to cancel the selection
- a to select all, then a to deselect all
The meaning of each module
/*
Bable, (commonly used, required) solves compatibility issues, supports ES6 code translation into browser-recognizable code
TypeScript, is a language extension that adds features to JavaScript, adding many functions,
Progressive developed by Microsoft Web App (PWA) Support, progressive web applications support
Router, (commonly used) is vue-router routing.
Vuex, is a state management pattern + library (commonly used) for Vue.js applications.
CSS Pre-processors, (commonly used) support CSS pre-processors, Sass/Less pre-processors.
Linter / Formatter, (commonly used) supports code style checking and formatting. If you don't want to check the code specification, don't choose it. It is recommended not to choose
Unit Testing, which supports unit testing.
E2E Testing, supports E2E testing.
*/
Step 5, select the version of Vue.js to start the project, 2.0, press Enter
Step 6, whether to use history mode routing, press Enter
Step 7, select CSS preprocessor, select Enter
Step 8, where to put the configuration of babel, postcss, eslint
- Option one, independent file configuration, (generally choose this)
- Option two, put it in package.json