Vue 脚手架创建项目

操作指导:右键文件在集成终端中打开,并输入创建脚手架命令[ vue create 文件名(英文) ]初始化项目 ,空格键为选择,enter键为下一步

1. Manually select features(手动选择配置项,勾选router、vuex、css预处理)

  • √  Choose Vue version
  • √  Babel
  • TypeScript
  • Progressive Web App (PWA) Support
  • √  Router
  • √  Vuex
  • √  CSS Pre-processors
  • Linter / Formatter
  • Unit Testing
  • E2E Testing

2. Choose a version of Vue.js that you want to start the project with (Use arrow keys)

选择vue版本,这里选择vue2

  • √  2.x
  • 3.x

3.Use history mode for router? (Requires proper server setup for index fallback in production) (Y/n)

路由模式是否用history,这里选否。 默认用hash模式

  • n

4. Pick a CSS pre-processor (PostCSS, Autoprefixer and CSS Modules are supported by default): (Use arrow keys)

选择你的css预处理语言,这里选less

  • Sass/SCSS (with dart-sass)
  • Sass/SCSS (with node-sass)
  • √  Less
  • Stylus

5. Pick a linter / formatter config: (Use arrow keys)

选择你的eslint标准,这里选择默认标准

  • ESLint + Airbnb config
  • √  ESLint + Standard config
  • ESLint + Prettier

6.Pick additional lint features: (Press <space> to select, <a> to toggle all, <i> to invert selection)

选择你的代码检查方式,选择第一个(保存的时候检查代码), 第二个是编译时检查

  • √  Lint on save
  • Lint and fix on commit

7. Where do you prefer placing config for Babel, ESLint, etc.? (Use arrow keys)

选择要不要把 Babel, ESLint, etc单独放在一个配置文件中。(选择第一个)

  • √  In dedicated config files
  • n package.json

8.Save this as a preset for future projects? (y/N)

是否保存本次配置,选择否

  • n