NRM 动态切换不同的 npm源
nrm
可以帮助你不同的NPM登记之间方便,快捷开关,现在包括:npm
,cnpm
,taobao
,nj(nodejitsu)
,rednpm
。
如何配置纱线使用私人注册表?
只需在项目的目录中添加.yarnrc并在其中写入: registry “http://your.registry”
或者您可以在HOME目录的.yarnrc中进行配置
安装
npm install -g nrm
例
$ nrm ls * npm ----- https://registry.npmjs.org/ cnpm ---- http://r.cnpmjs.org/ taobao -- https://registry.npm.taobao.org/ nj ------ https://registry.nodejitsu.com/ rednpm -- http://registry.mirror.cqupt.edu.cn skimdb -- https://skimdb.npmjs.com/registry $ nrm use cnpm //switch registry to cnpm Registry has been set to: http://r.cnpmjs.org/
用法
用法:nrm [options] [command]
Usage: nrm [options] [command] Commands: ls List all the registries use <registry> Change registry to registry add <registry> <url> [home] Add one custom registry del <registry> Delete one custom registry home <registry> [browser] Open the homepage of registry with optional browser test [registry] Show the response time for one or all registries help Print this help Options: -h, --help output usage information -V, --version output the version number