nrm

2020-08-26  本文已影响0人  栗子daisy

nrm(npm registry manager )是npm的镜像源管理工具

npm set registry https://registry.npm.taobao.org/
npm config rm registry

命令
查看npm源地址 npm config list
全局安装nrm npm install -g nrm
查看当前nvm版本 nrm -V
显示所有命令。 nrm -h
查看可选的源 nrm ls
查看当前使用的是哪个源 - nrm current
- npm config get registry
切换源 nrm use <registry>
切换到taobao源 - nrm use taobao 或
- npm set registry https://registry.npm.taobao.org/
切回官方源 - nrm use npm 或
- npm config rm registry
增加定制私有源 - nrm add <registry> <url> [home]
其中reigstry为源名,url为源的路径。
测试源的访问速度, 不加registry时测试所有的。 nrm test [registry]
删除自定义源 nrm del <registry>
发布包到自定义源,如果没有使用自定义源,则直接发布到npm。 nrm publish [options] [<tarball>|<folder>]
浏览器中打开源首页 - nrm home <registry> [browser]
- nrm home taobao
设置自定义源的授权信息。 nrm set-auth <registry> <value> [always]
给自定义源设置路径 nrm set-email <registry> <value>
设置发布到自定义源的npm托管仓储 nrm set-hosted-repo <registry> <value>
> nrm test
 npm ---- 1511ms
  yarn --- 1035ms
  cnpm --- 42884ms
*  taobao - 503ms
  nj ----- Fetch Error
  npmMirror  2376ms
  edunpm - Fetch Error
dnpm --- Fetch Error
上一篇 下一篇

猜你喜欢

热点阅读