1. 安装iTerm2做终端窗口
官网地址:https://iterm2.com
2. 安装Homebrew
官网地址:https://brew.sh
在命令行执行
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
在macOS Big Sur (11.1)里需要自己手工加入程序路径
vi ~/.zshrc
增加export PATH=$PATH:/opt/homebrew/bin
退出并重新进入运行终端窗口程序。
3. 安装 npm
- 到官方确认当前最新版本,地址为:https://github.com/npm/cli
运行如下命令(注意变更版本号)
npm install -g npm@7.6.1
确认npm已经安装成功
npm -v
顺便检查一下系统自带的Node.js和git的版本号 ```shell node -v v15.11.0
git —version git version 2.24.3 (Apple Git-128)
<a name="8IMIK"></a>
###
- 安装cnpm
```shell
$ npm install -g cnpm --registry=https://registry.npm.taobao.org
$ cnpm -v
$ cnpm init -y
4. 自行安装Node.js
若对已安装的node版本不满意,可以尝试用brew安装其他版本,或访问 官网 选择macOS Installer安装:
5. 安装tyarn
推荐使用 tyarn 来进行包管理,可以极大地减少 install 的时间和失败的概率,并且完全兼容 npm。如果喜欢使用 npm 而不是 yarn,可以使用 cnpm, 安装速度比 tyarn 更快,但是与 npm 不是完全兼容。
#安装
npm i yarn tyarn -g
#检查版本
tyarn -v
6. 安装Google Chrome浏览器
官网地址:https://www.google.com/intl/zh-CN/chrome/
7. 安装Visual Studio Code
官网地址:https://code.visualstudio.com