1, install,

  • Uninstall the old versionvue-cli

    NPM uninstall VUE -CLI -g or YARN Global remove VUE – CLI

  • nodeVersion 8.9 and above
  • The installation

    NPM install -g@vue /cli or YARN Global add @vue/cli

  • Check the version

    Vue –version or vUE -v

Create a project

vue create my-project
Copy the code
  • Please pick a preset: Choose a preset, which can be used as a defaultdefault (babel, eslint)Preset, which includes the Babel + Eslint setting, is also an option for a manually selected featureManually select featuresTo select the desired features.

The default Settings are great for quickly prototyping a new project, while manual Settings provide more options that are more desirable for production-oriented projects. Generally, select Manually select features.

  • Check the features needed for your project: Select configuration, see personal project requirements, the space bar is selected and cancelled, A key is all
  • Babel
  • TypeScript
  • Progressive Web App (PWA) Support
  • Router
  • Vuex
  • CSS Pre-processors
  • Linter / Formatter
  • Unit Testing
  • E2E Testing
  • Babel transforms ES6 code into ES5 code
  • TypeScript supports source writing in TypeScript
  • Progressive Web App (PWA) Support PWA Support
  • The Router supports vue – the Router
  • Vuex support Vuex
  • CSS pre-processors CSS pre-processors are supported
  • Linter/Formatter supports code style checking and formatting
  • Unit Testing supports Unit Testing
  • E2E Testing Supports E2E Testing

Router: Select the history mode

CSS preprocessor: Select Less

Linter: Select ESLint + Standard Config

Lint on save

The configuration file is stored In a dedicated Config files folder

Ask if you want to record this configuration for next use, such as the VUE-CLI3 configuration shown at the beginning

Press Enter to wait for the download

3, start,

cdMy-project // Go to the root directory NPM run serve // start the projectCopy the code