// 卸载之前版本npm uninstall vue-cli -g 或 yarn global remove vue-cli// 装置最新版本 npm install -g @vue/cli或 yarn global add @vue/cli//查看vue --version或vue -V
创立一个新我的项目:
vue-cli3疾速创立我的项目`1: vue create my-project
前两项都是你此前保留的设置,是我之前保留的预设配置。现在就能够间接应用了。如果没有配置保留过,能够抉择Manually select features
应用高低键配合 空格选中 ? Check the features needed for your project: (Press <space> to select, <a> to toggle all, <i> to invert selection) 2 >( ) Babel //转码器,能够将ES6代码转为ES5代码,从而在现有环境执行。 3 ( ) TypeScript// TypeScript是一个JavaScript(后缀.js)的超集(后缀.ts)蕴含并扩大了 JavaScript 的语法,须要被编译输入为 JavaScript在浏览器运行,目前较少人再用 4 ( ) Progressive Web App (PWA) Support// 渐进式Web应用程序 5 ( ) Router // vue-router(vue路由) 6 ( ) Vuex // vuex(vue的状态管理模式) 7 ( ) CSS Pre-processors // CSS 预处理器(如:less、sass) 8 ( ) Linter / Formatter // 代码格调检查和格式化(如:ESlint) 9 ( ) Unit Testing // 单元测试(unit tests)10 ( ) E2E Testing // e2e(end to end) 测试
2:
这里询问的是 是否应用class格调的组件语法,如果在我的项目中想要放弃应用Typescript的class格调的话,倡议大家抉择y
3:
应用Babel与TypeScript一起用于自动检测的填充?这里抉择y
4:
路由是否应用history模式?
5:
ESLint with error prevention only // 只进行报错揭示
ESLint + Airbnb config // 不谨严模式
ESLint + Standard config // 失常模式
ESLint + Prettier // 严格模式
TSLint (deprecated) // TypeScript格局验证工具
我抉择的第一项。
6:
Unit Testing
? Pick a unit testing solution: (Use arrow keys)
Mocha + Chai
Jest
抉择第一项。
原文: https://segmentfault.com/a/1190000022684511?utm_source=tag-newest