- 全局安装node:https://nodejs.org/en/
2 安装@vue/cli
npm install -g @vue/cli
3 在想要存放项目的文件夹里打开命令行,输入命令 vue create test(项目名自起)
3.1 选择创建项目的方式,默认和手动选择
Vue CLI v5.0.4
? Please pick a preset: (Use arrow keys)
> Default ([Vue 3] babel, eslint)
Default ([Vue 2] babel, eslint)
Manually select features
3.2选择需要的特性 、
Vue CLI v5.0.4
? 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
(*) TypeScript
( ) Progressive Web App (PWA) Support
(*) Router
(*) Vuex
>(*) CSS Pre-processors
(*) Linter / Formatter
( ) Unit Testing
( ) E2E Testing
Vue CLI v5.0.4
? 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=》支持高阶语法转换,例如转换es6
( ) TypeScript=>JS的超集
( ) Progressive Web App (PWA) Support=》渐进式网络应用支持
( ) Router=》路由