English Docs | 中文文档
nnrm = new nrm
New npm registry manager.
Use smaller dependencies than nrm.
# install
npm install -g nnrm
yarn global add nnrm
pnpm add -g nnrm
These commands are used to toggle the corresponding registry.
nnrm
&nrm
: npmnyrm
&yrm
: yarnprm
: pnpm
nnrm ls
# nrm ls
# yrm ls
# prm ls
nnrm use taobao
# nrm use taobao
# yrm use taobao
# prm use taobao
# set `.npmrc` for local
nrm use taobao -l
nnrm test
# nrm test
# yrm test
# prm test
nnrm -h
: show help message
Usage:
$ nrm <command> [options]
Commands:
ls List all the registries
use [registry] Change registry
test Show response time for all registries
add <registry> <url> [home] Add a custom registry
remove <registry> Remove a custom registry
Options:
-h, --help Display this message
-v, --version Display version number
Usage:
$ nrm use [registry]
Options:
-l, --local set '.npmrc' for local
nnrm add example https://xxx.com
nnrm remove example
It will be recorded in your ~/.nnrm/registries.json
.
- npm -------- https://registry.npmjs.org/
- yarn ------- https://registry.yarnpkg.com/
- taobao ----- https://registry.npmmirror.com/ (taobao redirect
npm.taobao.org
tonpmmirror.com
) - tencent ---- https://mirrors.cloud.tencent.com/npm/
- npmMirror -- https://skimdb.npmjs.com/registry/
- github ----- https://npm.pkg.github.com/
- Support
npm
/yarn
/pnpm
(the registry ofyarn
andnpm/pnpm
is independent of each other) - Smaller Dependencies
- Use
node-fetch
instead ofrequest
for speed test - Use
execa
instead ofnpm
- Use
cac
instead ofcommander
- Use
- Asynchronously display source speed test results
- Colorful console info
- Automatically display the registry list after each modification, and mark the current registry
nrm relies on the deprecated request
with a larger package body, the npm
package, and some other npm dependencies.
So installing nrm is also a very slow thing.
minimist is only 1.3 KB, but it is just a parameter parsing tool.
We need a tool that can automatically generate help information.
cac(3.6KB) is smaller than commander(6.8KB). And i love C.C.
node-fetch is only 289B!
axios(4.6KB) is good, but node-fetch is smaller.
request(184.8KB) has been deprecated and it is so big.
Why execa?
execa is only 8.4KB.
Install package npm to use npm.config.set('registry', 'xxx')
is expensive.
We just need use local command: npm config set registry xxx
.
If you are a Windows user, you may want to make sure that you use a generic command line like bash
instead of CMD
.
nrm(command) is a command of nrm(package).
You should uninstall nrm(package)
to use nrm(command)
with nnrm(package)
. Or you can use nnrm(command)
.
nrm(command) may conflict with nrm or ni. You can uninstall them or just use command
nnrm
without uninstalling them.