美文网首页
npm registry 管理

npm registry 管理

作者: 卖梦想的男孩 | 来源:发表于2016-12-07 13:46 被阅读575次

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

功能

npm为用户提供快速管理npm registry,默认支持npm,cnpm,nj,taobao,rednpm之间的切换,可以自己添加额外的registry

使用

  • 安装
$ npm install -g nrm
  • 查看所有registry
$ 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
  • 切换registry
$ nrm use [registry] 
  • 对比原来config方式
npm --registry https://registry.npm.taobao.org install xxx
或者
npm config set registry https://registry.npm.taobao.org
npm install xxx
或者
npm install -g cnpm --registry=https://registry.npm.taobao.org
cnpm install xxx
  • help
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

附录

Github

相关文章

网友评论

      本文标题:npm registry 管理

      本文链接:https://www.haomeiwen.com/subject/nzjdmttx.html