vue3创建项目详解

已创建项目news 为例

vue create news

1. 选择自定义   

Vue CLI v5.0.8                             
? Please pick a preset:                           ?请选择一个预设:(使用箭头键)
  Default ([Vue 3] babel, eslint)                 >默认值([Vue 3]babel,eslint)
  Default ([Vue 2] babel, eslint)                 默认值([Vue 2]babel,eslint)
> Manually select features                        手动选择功能

 

2. 自定义选项  (箭头切换选择  空格切换选种状态  entente 进入下一步)

? 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, and <enter> to proceed)
 (*) Babel                                                  //开源的 JavaScript编译器   最新版本的JavaScript代码转换为较旧的版本,以便更好地支持不同的浏览器。
 ( ) TypeScript                                             //   主要提供了类型系统和对 ES6的支持
 ( ) Progressive Web App (PWA) Support                      //渐进式Web应用程序(PWA)支持
 ( ) Router                                                 //路由
 ( ) Vuex                                                   //态存储是响应式的
>(*) CSS Pre-processors                                     //CSS预处理器
 ( ) Linter / Formatter                                     //代码规范与美观
 ( ) Unit Testing                                           //单元测试
 ( ) E2E Testing                                            //E2E测试

选择 2.x或 3.x  选择css 预处理器 less 

3. 选择配置方放置目录

? Please pick a preset: Manually select features
? Check the features needed for your project: Babel, CSS Pre-processors
? Choose a version of Vue.js that you want to start the project with 2.x
? Pick a CSS pre-processor (PostCSS, Autoprefixer and CSS Modules are supported by default): Less
? Where do you prefer placing config for Babel, ESLint, etc.? (Use arrow keys)      //您更喜欢将Babel、ESLint等的配置放在哪里。?
> In dedicated config files                                                         //在专用配置文件中
  In package.json                                                                   //在package.json中
? Save this as a preset for future projects? (y/N) n //?是否将其保存为将来项目的预设?(是/否)

  

npm run serve

 

posted @ 2023-09-01 14:36  模糊的星空  阅读(85)  评论(0)    收藏  举报