Preparations (Check whether Node, NPM, and VUe-CLI are installed)
- Check whether Node is installed:
node -v
- Check whether NPM is installed:
npm -v
- Check whether vue is installed using cli:
vue -V
(The version number of the scaffold is shown) - If no input is installed
npm install vue-cli -g
The installation
Select create project in a directory (CD drag folder)
Enter vue create vuecli4
Configuration items (arrow keys can be selected)
- Alternatively, you can configure the project directly from the previously saved template
Select configuration items (space bar selection)
- You can also customize options
-
() Babel // transcoder, which can convert ES6 code into ES5 code and execute in the existing environment.
-
TypeScript// TypeScript is a superset of JavaScript (postfix.js) (postfix.ts) that contains and extends JavaScript syntax and needs to be compiled and output as JavaScript to run in the browser
-
() Progressive Web App (PWA) Support//
-
() Router // VUE Router
-
() Vuex // Vuex (VUE state management mode)
-
() CSS pre-processors // CSS pre-processors (e.g. Less, Sass)
-
Linter/Formatter // code style checking and formatting (e.g. : ESlint)
-
() Unit Testing // Unit tests
-
E2E Testing // E2E (end to end) Testing
Select the VUE version. The default is 2.x
# whether to use the history router
- It is recommended to select N, because it can be directly run when packaged to the server. If you want to use it later, you can also open it again by yourself. The topic of “yes” needs to be set by the server
Select the CSS preprocessor
- Node-sass is automatically compiled in real time. Dart-sass takes effect only after being saved
node-sass