vue-cli 3 脚手架搭建(create)


地址:https://cli.vuejs.org/zh/guide/
1.npm install -g @vue/cli

2.vue create hello-world // 项目名称

终端:(上下键选择)

  • default (bable,eslint) // 默认

  • Manually select features // 手动 **选择手动创建项目回车
    终端:(上下键移动键,空格键是否选中)
    ? Please pick a preset: Manually select features
    ? Check the features needed for your project:

  • (*) Babel

  • ( ) TypeScript // 语法

  • ( ) Progressive Web App (PWA) Support // PWA

  • (*) Router // 路由

  • () Vuex // store

  • ( ) CSS Pre-processors // 预编译

  • () Linter / Formatter // 格式化代码

  • ( ) Unit Testing

  • ( ) E2E Testing
    回车
    终端:
    ? Please pick a preset: Manually select features // 手动创建项目
    ? Check the features needed for your project: Babel, Router, Vuex, CSS Pre-processors, Linter
    ? Use history mode for router? (Requires proper server setup for index fallback in production) Yes
    //在生产中需要适当的服务器设置用于索引回退
    ? Pick a CSS pre-processor (PostCSS, Autoprefixer and CSS Modules are supported by default): Sass/SCSS
    // css 预编译
    ? Pick a linter / formatter config: Prettier // (ESLint + Prettier)格式化程序配置
    ? Pick additional lint features: Lint on save // 保存即检查格式
    ? Where do you prefer placing config for Babel, PostCSS, ESLint, etc.? In dedicated config files
    // 其他配置数据单独存放再一个配置文件内
    ? Save this as a preset for future projects? Yes
    // 是否保存这个项目的配置
    ? Save preset as: SaveVue3.0
    // 是的话 项目命名假设为:createVue3.0 下一次可直接选择这个模板创建


文章作者: Born to the sun
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 Born to the sun !
评论
  目录