笔记【1】-nvm&nrm

一、nvm

1、安装

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash

2、环境设置

.bash_profile

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This >loads nvm bash_completion

3、命令

3.1 安装

nvm install

3.2 切换

nvm use

3.3 列表

nvm ls

->      v12.2.0
default -> 12.2.0 (-> v12.2.0)
node -> stable (-> v12.2.0) (default)
stable -> 12.2 (-> v12.2.0) (default)
iojs -> N/A (default)
lts/* -> lts/gallium (-> N/A)
lts/argon -> v4.9.1 (-> N/A)
lts/boron -> v6.17.1 (-> N/A)
lts/carbon -> v8.17.0 (-> N/A)
lts/dubnium -> v10.24.1 (-> N/A)
lts/erbium -> v12.22.10 (-> N/A)
lts/fermium -> v14.19.0 (-> N/A)
lts/gallium -> v16.14.0 (-> N/A)

3.4 当前版本

nvm current

二、nrm

1、安装

npm install -g nrm

2、命令

2.1 源列表

nrm ls

  npm ---------- https://registry.npmjs.org/
  yarn --------- https://registry.yarnpkg.com/
  tencent ------ https://mirrors.cloud.tencent.com/npm/
  cnpm --------- https://r.cnpmjs.org/
  taobao ------- https://registry.npmmirror.com/
  npmMirror ---- https://skimdb.npmjs.com/registry/

2.2、新增

nrm add suning http://snpm.cnsuning.com

2.3、删除

nrm del suning http://snpm.cnsuning.com

2.4、切换

nrm use suning

你可能感兴趣的:(笔记【1】-nvm&nrm)