? Use history mode forrouter? (Requires proper server setup forindex fallback in production) (Y/n) // 是否使用 history 模式作为 Vue 的路由(n) 默认hash
选择 CSS 预处理器方案:Sass/SCSS (with dart-sass)
? 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
选择代码检测和格式化方案:ESLint + Standard config
? Pick a linter / formatter config:
ESLint with error prevention only // 只检测错误
ESLint + Airbnb config // ESLint + Airbnb 规范风格
> ESLint + Standard config // ESLint + standardJs 规范风格
ESLint + Prettier // ESLint + Prettier 代码格式化工具
选择何时进行代码检测:Lint on save, Lint and fix on commit
? Pick additional lint features:
>(*) Lint on save // 保存时进行检测
(*) Lint andfix on commit // fix 和 commit 时候检查
选择(Babel、PostCSS、ESLint)自定义配置的存放位置:
? Where doyou prefer placing config forBabel, PostCSS, ESLint, etc.?
> In dedicated config files // 单独保存各自配的置文件(推荐)
In package.json // 放在 package.json 内
是否保存当前配置:Y/回车
? Save this asa preset forfuture projects? (y/N) // 是否保存现在的配置,作为未来项目的预配置
输入保存的配置名称:MyPreset
保存配置之后,在以后执行创建指令时会多出此选项,选择该配置便能跳过配置直接安装。
? Save preset as: MyPreset // 输入存档名称
开始项目初始化:
Vue CLI v4.5.15 ✨ Creating project in D:\Vue\vue-demo. 🗃 Initializing git repository... ⚙️ Installing CLI plugins. This might take a while...
...
🎉 Successfully created project edu-boss-fed. 👉 Get started with the following commands:
$ cd edu-boss-fed $ npm run serve
...
// 如果没有设置用户名和邮箱会警告
WARN Skipped git commit due to missing username and email in git config, or failed to sign commit. You will need to perform the initial commit yourself.