准备工作
- 检查node、npm、git版本
安装列表
1.node.js
2.npm
3.yarn
4.vscode
5.firefox
6.vue-cli
步骤
1.下载各软件安装依赖
2.安装浏览器假装vue插件
3.安装node
4.安装yarn
5.修改node和yarn的镜像地址
6.安装git
7.安装vscode,并同步配置和插件
8.安装vue-cli脚手架
9.验证安装
实际操作
1.装火狐,登账号同步,确保vue-devtool
2.装node,https://nodejs.org/en/download/
2.1. npm镜像源,npm config set registry https://registry.npm.taobao.org/
3.装yarn,https://yarnpkg.com/getting-started/install
3.1 yarn镜像源,yarn config set registry https://registry.npm.taobao.org/
3.1.验证安装,
node --version
npm --version
yarn --version
4.brew install git
5.装vscode,https://code.visualstudio.com/docs/setup/mac
6.vue-cli安装
yarn global add @vue/cli
6.1. vue验证
vue ui
6.2. 创建项目
- 设置包管理器,初始化git仓库
- css pre-processor,使用配置文件,两个选项开启
- css预处理器可以选less(较少依赖,无需下载编译c文件)
- linter选eslint+standard config
- 创建项目,创建完成后,回到vscode进行开发
- 调试执行,验证安装
yarn serve
# 或者
npm run serve