Github GitHub - YunYouJun/nnrm: 🔧 New nrm (NPM registry manager). Use smaller de...
source link: https://github.com/YunYouJun/nnrm/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
New npm registry manager.
Use smaller dependencies than nrm.
Install
# install yarn global add nnrm npm install -g nnrm
Usage
nnrm
& nrm
is used to toggle npm registry.
nyrm
& yrm
is used to toggle yarn registry.
nnrm ls # nrm ls # yrm ls nnrm use taobao # nrm use taobao # yrm use taobao nnrm test # nrm test # yrm 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
Add custom registry
nnrm add example https://xxx.com # nnrm remove example
It will be recorded in your ~/.nnrm/registries.json
.
Default Registires
Features
- use node-fetch instead of request for speed test
- use execa instead of npm
- use cac instead of commander
- asynchronously display source speed test results
- colorful info
- support npm and yarn
Why new nrm?
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.
Why cac?
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.
Why node-fetch?
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
.
Recommend
-
32
Join GitHub today GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
-
9
nrm (Node Registry Manager) - npm 源管理工具使用 使用 nrm 来快速切换 npm 的源。 1npm i nrm -g列出当前的源12345
-
7
New features and storage options in Red Hat Integration Service Registry 1.1 GA
-
7
New Images Show Smaller iPhone 13 Notch Compared to iPhone 12 ...
-
6
iPhone 13 is projected to see the daylight in September Apple is projected to take the wraps off the new-generation iPhone in September this year, and unsurprisingly, the company has remained comple...
-
8
Apple Unveiled New iPhones And A New iPad Mini Better camera, faster chip. Steve Jobs’ fairly consequential idea continues to improve at the expected rate. Plus, new iPads! ...
-
2
nnrm - 一个极简的 npm/yarn registry 切换管理器 2021-03-05- 1841- 7查看链接nnrm 即 new nrm...
-
3
ThoughtSpot adds new BI capabilities, editions for smaller organizations
-
4
YunYouJun/give-me-money2017-12-26一个沙雕钓鱼网站
-
6
A New Capacitor Plugin Registry for Enhanced Discoverability Dallas James
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK