Scaffolding mounting vue-cli3

Reference article links   https://www.cnblogs.com/Jmosquito/p/11328288.html

 

1.vue scaffolding needs node.js support, so you need to download and install node.js, can go to the official website to download node.js node.js  https://nodejs.org/zh-cn/  , you can download the version according to individual needs, recommended for most users (LTS)

2. Installation is very simple, a string of little get away the next point, the installation path to suit your own preferences love

3. After the installation is complete win + R input cmd View version Installation

 Too slow to consider when installing third-party packages 4.npm npm config set registry = http: //registry.npm.taobao.org/

See also online also recommended to install npm install CNPM cnmp  -g  --registry = HTTPS : / / Registry .npm .taobao .org it according to their personal preferences, the second installation of a high success rate, and the second is to replace npm cnpm use

 

 

 

5 global installation vue-cli, command prompt window to perform: npm install -g @ vue / cli or second cnpm install -g @ vue / cli

 

 

 

 

 

 Here to congratulate you install success

6 vue -V View version  

 

 

 

 

 7 now create by scaffolding project, I put the project created under the E disk test folder, where you can store location based on personal preferences, first locate the folder by dos command

 

 

 

 

 

8 Then create a project, vue create myvue Enter the name of the project is to create a project myvue, you can customize the project name, and then entered a series of question and answer session, default is the default configuration, the following is to manually select the configuration I chose the second, down arrow selected (switched up and down arrows) Enter

 

 

 

 

 9 babel: conversion es6 syntax of this must be, typescript temporarily not involved, router management routing is also elected, vuex state management or need to see their own use, css pre style preprocessor also add this, linter / Formatter uniform Code style, the last two are the unit tests and test end to end, generally not used

 

 

 

 Then came 10 quiz: your routes using historical patterns do? Hash routing mode is divided into mode History (history) mode Abstract pattern three kinds of hash model is the most obvious feature is the will with the #, History url on historical patterns the same url address to access just like normal, here I choose yes,

    Next select 10.1 css preprocessor I chose sass / scsss

  10.2 select which automated detection code formatting (syntax check tool) that can detect potential problems in your code, write code to ensure correct grammar, style uniform.

ESLint with error prevention only (only to detect errors) ESLint + Airbnb config unicorn's Airbnb, someone commented, "This is a most reasonable coding standards of javascript" It covers almost all aspects of js

ESLint + Standard config standardjs js is a powerful coding standard, and comes linter automatic correction codes, no automatic formatting codes, can be found early regulatory issues and lower error coding

ESLint + Prettier Prettier as code formatting tools that can unify the entire team's coding style I chose ESLint + Standard config

   10.3 select syntax checking mode Lint on save (save on detection) Lint and fex on commit (git users to submit files to detect when) I chose Lint on save  

   10.4 is to ask you babel, postcss, eslint these profiles put what? // in dedicated config files (in a dedicated configuration file is managed separately) in package.json (on package.json years) I chose in dedicated config files

   10.5 whether these will be saved as a pre-configured for future projects? // If you choose y then the next project is to build this option will appear once you have configured. I chose n

 

 11 successful installation

 

 

 

 

 

 Project Directory Structure

 

Guess you like

Origin www.cnblogs.com/lmx217/p/12509956.html