xgqfrms™, xgqfrms® : xgqfrms's offical website of cnblogs! xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

nrm & cnpm All In One

nrm & cnpm All In One

$ nrm ls

* npm -------- https://registry.npmjs.org/
  yarn ------- https://registry.yarnpkg.com/
  cnpm ------- http://r.cnpmjs.org/
  taobao ----- https://registry.npm.taobao.org/
  nj --------- https://registry.nodejitsu.com/
  npmMirror -- https://skimdb.npmjs.com/registry/
  edunpm ----- http://registry.enpmjs.org/
$ nrm -h
Usage: nrm [options] [command]

Options:
  -V, --version                           output the version number
  -h, --help                              output usage information

Commands:
  ls                                      List all the registries
  current                                 Show current registry name
  use <registry>                          Change registry to registry
  add <registry> <url> [home]             Add one custom registry
  set-auth [options] <registry> [value]   Set authorize information for a custom registry with a base64 encoded string or username and pasword
  set-email <registry> <value>            Set email for a custom registry
  set-hosted-repo <registry> <value>      Set hosted npm repository for a custom registry to publish packages
  del <registry>                          Delete one custom registry
  home <registry> [browser]               Open the homepage of registry with optional browser
  publish [options] [<tarball>|<folder>]  Publish package to current registry if current registry is a custom registry.
   if you're not using custom registry, this command will run npm publish directly
  test [registry]                         Show response time for specific or all registries
  help                                    Print this help

nrm

# npm 切换到 xnpm ✅ 👍

$ nrm ls

# 注册 add <registry> <url> [home] 
$ nrm add xnpm https://registry-cnpm.xgqfrms.xyz

$ nrm use xnpm

# install all
$ npm i

# install @xgqfrms/xui  
$ npm i @xgqfrms/xui  

# alias, install
# $ xnpm i @xgqfrms/xui   

# 默认 -S
# $ xnpm install @xgqfrms/xui 
# $ xnpm install @xgqfrms/xui -S
# $ xnpm install @xgqfrms/xui --save
 

https://github.com/Pana/nrm

cnpm

# npm 切换到 cnpm  ✅👎

$ npm install -g cnpm --registry=https://registry.npm.taobao.org

$ cnpm config set registry https://registry-cnpm.xgqfrms.xyz

$ cnpm install @xgqfrms/xui --save

$ cnpm install @xgqfrms/xui -S
# 默认 -S
$ cnpm install @xgqfrms/xui 
      

https://github.com/cnpm/cnpm

https://github.com/cnpm

refs



©xgqfrms 2012-2020

www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!

原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!


posted @ 2021-05-31 12:08  xgqfrms  阅读(70)  评论(4编辑  收藏  举报