vue create 项目名称
? Please pick a preset: (Use arrow keys)
default (babel, eslint)
Manually select features
? Please pick a preset: Manually select features
? Check the features needed for your project: (Press <space> to select, <a> to toggle all, <i> to invert selection)
>( ) Babel
( ) TypeScript
( ) Progressive Web App (PWA) Support
( ) Router
( ) Vuex
( ) CSS Pre-processors
( ) Linter / Formatter
( ) Unit Testing
( ) E2E Testing
一般项目开发只需要选择`Babel`、`Router`、`Vuex`就足够了
Use history mode for router? (Requires proper server setup for index fallback in production)
路由是否使用`history`模式?如果项目中存在要求就使用`history`(即:y),但是一般还是推荐大家使用`hash`模式,毕竟`history`模式需要依赖运维。
? Pick a CSS pre-processor (PostCSS, Autoprefixer and CSS Modules are supported by default): (Use arrow keys)
> Sass/SCSS (with dart-sass)
Sass/SCSS (with node-sass)
Less
Stylus
? Pick a linter / formatter config: (Use arrow keys)
> ESLint with error prevention only
ESLint + Airbnb config
ESLint + Standard config
ESLint + Prettier
TSLint (deprecated)
? Pick additional lint features: (Press <space> to select, <a> to toggle all, <i> to invert selection)
>(*) Lint on save // 保存时检测
( ) Lint and fix on commit // 修复和提交时检测
npm install --save axios
vue add axios