Appearance
nrm
镜像加速 - nrm
可以帮助我们在不同的镜像间进行切换,帮助你加快软件的下载
首先安装命令
sh
$pnpm add -g nrm
#或
$npm install -g nrm
常用命名
- 查看镜像列表
sh
$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/
- 选择腾讯镜像:
sh
$nrm use tencent
- 查看当前源
sh
$nrm current
# //或
$nrm test
- 测试速度
sh
$nrm test
- kk
其他方法
设置镜像加速可以加快软件下载速度,下面是设置npm的镜像源为阿里云:
sh
$npm config set registry https://registry.npmmirror.com
也可以使用 阿里云镜像 安装 cnpm 命令:
sh
$npm install -g cnpm --registry=https://registry.npmmirror.com