使用 nrm 管理 npm 源
安装
➜ ~ npm i nrm -g |
使用
# 查看 nrm 内置的几个 npm 源 |
➜ ~ npm i nrm -g |
# 查看 nrm 内置的几个 npm 源 |
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash |
或
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash |
脚本的作用是将 nvm 仓库源码克隆到 ~/.nvm
下面,之后将环境变量添加到配置文件中,如:~/.bash_profile
, ~/.zshrc
,~/.profile
,或 ~/.bashrc
。
所以会用到 git 命令,如果没有 Git,请先安装。