0
点赞
收藏
分享

微信扫一扫

vue cli 搭建项目 示意标注

敬亭阁主 2022-03-15 阅读 82
前端vue

01-自定义选择功能

空格键“选中”,回车下一页 
————————————————
 (*) Babel  ----  JavaScript 编译器 (必选)
 ( ) TypeScript  ----TypeScript 编写程序 
 ( ) Progressive Web App (PWA)  ----01 webapp支持 02 离线支持 我是新手 (不选)
>(*) Router  ----vue的URL管理 早晚要用(选上)
 (*) Vuex    ----vue状态管理 早晚要用(选上)
 (*) CSS Pre-processors   ----css代码编译 如less、sass、sass等  用原生css (可不选)
 (*) Linter / Formatter   ----代码规范插件 (新手一定别选)
 ( ) Unit Testing   ----前端单元测试 (不选)
 ( ) E2E Testing    ----自动化测试 (不选)

02-选择vue使用版本


? Choose a version of Vue...
  3.x
> 2.x

03-是不是用history模式来创建路由

默认:hash模式

一般场景下,hash 和 history 都可以,除非你更在意颜值,# 符号夹杂在 URL 里看起来确实有些不太美丽。

转自介绍原文  https://www.jb51.net/article/144341.htm

Vue CLI v5.0.1
? Please pick a preset: Manually select features
? Check the features needed for your project: Babel, Router, Vuex, CSS Pre-processors
? Choose a version of Vue.js that you want to start the project with 2.x
? Use history mode for router? (Requires proper server setup for index fallback in production) (Y/n) no

04-选择css编译器类型(原生css没有这一步)

? Pick a CSS pre-processor (PostCSS, Autoprefixer and
 CSS Modules are supported by default): (Use arrow keys)
> Sass/SCSS (with dart-sass)  ----css编译
  Less   ----css编译
  Stylus

05-配置文件是否单独存放

? Use history mode for router? (Requires proper server setup for index fallback in production) No
? Pick a CSS pre-processor (PostCSS, Autoprefixer and CSS Modules are supported by default): Sass/SCSS (with dart-sass)
? Where do you prefer placing config for Babel, ESLint, etc.? (Use arrow keys)
> In dedicated config files    ----单独放一个文件夹 (选单独存放)
  In package.json              ----都放package.json

06-是否存储你刚才的配置为一个预设类型 (下次直接选就能用)

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

07-预设命名

? Save this as a preset for future projects? Yes
? Save preset as: mingming  ----为你的预设起个名字

回车 就创建成功了

举报

相关推荐

0 条评论