快速切换npm源,github

NPM registry manager, fast switch between different registries: npm, cnpm, nj, taobao

Install

  1. $ npm install -g nrm

Usage

  1. $ nrm ls
  2. * npm ----- https://registry.npmjs.org/
  3. yarn ----- https://registry.yarnpkg.com
  4. cnpm ---- http://r.cnpmjs.org/
  5. taobao -- https://registry.npm.taobao.org/
  6. nj ------ https://registry.nodejitsu.com/
  7. skimdb -- https://skimdb.npmjs.com/registry
  8. $ nrm use cnpm //switch registry to cnpm
  9. // Registry has been set to: http://r.cnpmjs.org/

切换:

  1. $ nrm use taobao
  2. Registry has been set to: http://registry.npm.taobao.org/

增加源:

  1. $ nrm add <registry> <url> [home]

删除源:

  1. $ nrm del <registry>

测试速度:

  1. $ nrm test

忘记命令不用怕,记住-h,救急 $ nrm -h