版本
Vue CLI v4.4.6
安装
npm install -g @vue/cli
创建项目
vue create my-project
配置
? Please pick a preset:
default (babel, eslint)
> Manually select features
? Check the features needed for your project:
(*) Babel
( ) TypeScript
( ) Progressive Web App (PWA) Support
(*) Router
(*) Vuex
(*) CSS Pre-processors
(*) Linter / Formatter
( ) Unit Testing
( ) E2E Testing
? Use history mode for router? No
? Pick a CSS pre-processor:
Sass/SCSS (with dart-sass)
Sass/SCSS (with node-sass)
> Less
Stylus
? Pick a linter / formatter config:
ESLint with error prevention only
ESLint + Airbnb config
ESLint + Standard config
> ESLint + Prettier
? Pick additional lint features:
> (*) Lint on save
( ) Lint and fix on commit (requires Git)
? Where do you prefer placing config for Babel, ESLint, etc.?
> In dedicated config files
In package.json
? Save this as a preset for future projects? No
运行
cd my-project
npm run serve