大家要多多善用brew啊,不然curl下来的安装脚本还是相对难管理的。
NVM Node版本管理
Nvm node package management tools
➜ ~ brew install nvm
==> Downloading https://mirrors.ustc.edu.cn/homebrew-bottles/bottles/nvm-0.39.1_
Already downloaded: /Users/baron/Library/Caches/Homebrew/downloads/0c5870e1c350c24f1247d1c5417814f12e3779330e08ec0e23ba8ec3c1dd1be8--nvm-0.39.1_1.all.bottle.tar.gz
==> Reinstalling nvm
==> Pouring nvm-0.39.1_1.all.bottle.tar.gz
==> Caveats
Please note that upstream has asked us to make explicit managing
nvm via Homebrew is unsupported by them and you should check any
problems against the standard nvm install method prior to reporting.
You should create NVM's working directory if it doesn't exist:
mkdir ~/.nvm
Add the following to ~/.zshrc or your desired shell
configuration file:
export NVM_DIR="$HOME/.nvm"
[ -s "/opt/homebrew/opt/nvm/nvm.sh" ] && \. "/opt/homebrew/opt/nvm/nvm.sh" # This loads nvm
[ -s "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" ] && \. "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion
You can set $NVM_DIR to any location, but leaving it unchanged from
/opt/homebrew/opt/nvm will destroy any nvm-installed Node installations
upon upgrade/reinstall.
Type `nvm help` for further information.
==> Summary
🍺 /opt/homebrew/Cellar/nvm/0.39.1_1: 9 files, 184KB
==> Running `brew cleanup nvm`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
mkdir ~/.nvm
Add the env settings to you .zshrc file.
For new Mac you will only have zsh not bash profile. If yu have trouble of nvm like nvm: command not found.PLS fellow this link or my solution.https://github.com/nvm-sh/nvm#troubleshooting-on-macos
export NVM_DIR="$HOME/.nvm"
[ -s "/opt/homebrew/opt/nvm/nvm.sh" ] && \. "/opt/homebrew/opt/nvm/nvm.sh" # This loads nvm
[ -s "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" ] && \. "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion
brew必要安装包
-
sevenzip
使用7-zip官方package替换三方作者的p7zip
brew install sevenzip https://7-zip.org -
lefthook
使用于flutter,Node.js 等各种平台的git hook工具。 Node.js 项目可以使用husky。 git
-
cocoapods
应用级别的依赖管理器,针对Objective-C、Swift和其他任一在Objective-C运行时上运行的语言,如RubyMotion,[1] ,它为额外的库的管理提供了标准的格式。
-
nvm
node版本管理,Node.js 开发必备。
-
leoafarias/fvm/fvm
flutter版本管理。