介绍一下脚手架的作用
就是提供一个快速开发的完整系统
使用Vue/CLI
安装 Vue-cli
npm install -g @vue/cli // 全局安装
# OR
yarn global add @vue/cli // 使用 yarn 安装
查看版本
你还可以用这个命令来检查其版本是否正确
vue --version
升级版本
升级全局的 CLI
npm update -g @vue/cli
# 或者使用 yarn
yarn global upgrade --latest @vue/cli
创建Vue/CLI项目
通过通过Vue来创建项目
vue create 项目名称(尽量使用英文)
搭建脚手架
vue create 全过程 (尽量使用全中文解释)
使用下列来创建一个新项目
vue create HelloVue
Please pick a preset: (Use arrow keys) 选择使用模版
Check the features needed for your project: (Press to select, <a> to toggle all, <i> to invert selection,and to proceed) 选择依赖的配置
Choose a version of Vue.js that you want to start the project with 选择Vue版本
ESLint with error prevention only 检测代码工具
Pick additional lint features: (Press <space> to select, <a> to toggle all, <i> to invert selection, and to proceed) 什么时候进行检测
Where do you prefer placing config for Babel, ESLint, etc.? 是否保存预设