• Stars
    star
    130
  • Rank 276,556 (Top 6 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created over 3 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

🔧 New nrm (NPM registry manager). Use smaller dependencies.

nnrm

English Docs | 中文文档

npm GitHub code size in bytes node-current npm Libraries.io dependency status for latest release Snyk Vulnerabilities for npm scoped package

nnrm = new nrm

New npm registry manager.

Use smaller dependencies than nrm.

nnrm nrm
install size install size

由来

Install

# install
npm install -g nnrm
yarn global add nnrm
pnpm add -g nnrm

Usage

These commands are used to toggle the corresponding registry.

  • nnrm & nrm: npm
  • nyrm & yrm: yarn(v1-v3)
  • prm: 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

Add/Remove custom registry

nnrm add example https://xxx.com
nnrm remove example

It will be recorded in your ~/.nnrm/registries.json.

Default Registires

Features

  • Support npm/yarn(v1-v3)/pnpm (the registry of yarn and npm/pnpm is independent of each other)
    • yarn(v3) config use npmRegistryServer instead of registry
  • Smaller Dependencies
    • 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 console info
  • Automatically display the registry list after each modification, and mark the current registry

FAQ

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 vs commander vs cac | npm trends

minimist is only 1.3 KB, but it is just a parameter parsing tool.

We need a tool that can automatically generate help information.

commander and cac can do it.

cac(3.6KB) is smaller than commander(6.8KB). And i love C.C.

Why node-fetch?

node-fetch vs axios vs request

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 vs shelljs

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.

Error when use Windows?

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 conflicts with other commands

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.

Ref

Sponsors

More Repositories

1

cook

🍲 好的,今天我们来做菜!OK, Let's Cook!
Vue
4,932
star
2

air-conditioner

❄️ Yun Portable Air Conditoner. 云空调,便携小空调,为你的夏日带去清凉!
TypeScript
3,409
star
3

hexo-theme-yun

☁️ A fast & light & lovely theme for Hexo. 一个对可爱自以为是的 Hexo 主题。
Stylus
1,237
star
4

valaxy

🌌 Next Generation Static Blog Framework (Beta) 下一代静态博客框架(支持页面/配置热重载)
TypeScript
693
star
5

advjs

🎮 ADV.JS Web AVG Engine 面向未来与前端的文字冒险游戏引擎(WIP)
TypeScript
268
star
6

sese-engine-ui

🔍 Sese engine ui. 色色搜索引擎 UI
Vue
262
star
7

ai-sfc

AI 春联 / Spring Festival Couplets
Vue
252
star
8

mirai-ts

🔧 Mirai(QQ Bot) JavaScript/TypeScript SDK for Node.js/Browser
TypeScript
243
star
9

web-resume

📄 Display your resume by web. 可以被打印成 PDF 的 Web 简历。
Vue
216
star
10

cocos-creator-joystick

🕹 Cocos Creator Joystick Demo 虚拟摇杆
TypeScript
213
star
11

el-bot

🤖 基于 Node.js,可配置、可自定义插件的 QQ 机器人框架。(Refactoring...)
TypeScript
155
star
12

vtuber

👻 Make a vtuber from one. 从一开始的 Vtuber
TypeScript
145
star
13

char-dust

📝 Convert image to char. 在线图片转字符画~
TypeScript
134
star
14

yunyoujun.github.io

🌐 云游君的小站,一个自言自语的地方。
TypeScript
123
star
15

yun

☁️ 小云设定资源大公开!
85
star
16

kotodama

💬 掌控言灵的魔法,一个优雅的纯静态评论管理后台
Vue
71
star
17

give-me-money

💰 I'm so cute. Please give me money. 我很可爱,请给我钱。
Vue
60
star
18

wc-github-corners

:octocat: A web component for github corners. Can be used anywhere.
TypeScript
44
star
19

tauri-vite-vue

🌰 Vite + Vue Starter for Tauri.
TypeScript
31
star
20

girid

❤ 动画角色喜好表生成器 Lovely girls grid. Inspired by anime-grid.
TypeScript
31
star
21

sponsors

💰 Sponsors of @YunYouJun. 云游君的赞助者们
TypeScript
26
star
22

birthday

🎂 Happy Birthday To You!
Vue
26
star
23

cucthesis

CUC 硕士毕业论文 LaTeX 模版
TeX
25
star
24

augma

🎨 AR UI Framework 刀剑神域:序列之争
TypeScript
22
star
25

ak-ui

🔫 UI components for arknights. Deving... 在咕了
SCSS
22
star
26

export-nideriji

🔧 导出《你的日记》JSON 格式
JavaScript
20
star
27

element-theme-ink

✒️ Element theme ink. (Support Element-Plus)
SCSS
18
star
28

friends

👥 Friends of @YunYouJun.
JavaScript
17
star
29

vitepress-theme-you

🎮 A theme for vitepress. Sister of hexo-theme-yun.
Vue
17
star
30

YunYouJun

🤡 About Me.
TypeScript
16
star
31

explosions

My daily 「Explosion」 about HTML & CSS & JavaScript.
Vue
16
star
32

evil-eye

👀 邪王真眼,在浏览器端跟踪你的眼部观察内容
TypeScript
12
star
33

pixi-painter

🎨 Painter canvas based on PixiJS.
TypeScript
12
star
34

fe-notes

📒 小云的八股文前端笔记
TypeScript
12
star
35

star-markdown-css

🌟 Markdown Css about violet wandering planet.
SCSS
11
star
36

valine-to-disqus

⏩ Migrate from valine to disqus. 将 Valine 评论数据转换为 Disqus 可导入的格式。
JavaScript
11
star
37

vue-d3-demo

🌰 Vue + Vite + D3 Demo
Vue
11
star
38

vuepress-plugin-google-adsense

Google adsense plugin for vuepress
JavaScript
10
star
39

utils

🔧 Custom utils. 供日常使用的脚本小工具。
TypeScript
10
star
40

dotfiles

🔧 My dotfiles.
Shell
9
star
41

se-notes

软件工程应试笔记 | Software Engineering Notes
9
star
42

color-dust

Image theme color extraction. 色尘知有数,劫烬岂无年。
Vue
8
star
43

unplugin-glsl

🔌 Import, inline (and compress) GLSL shader files
TypeScript
7
star
44

hexo-widget-tree

🌲 Tree preview widget for hexo.
JavaScript
7
star
45

teachers-day

给教师节的老师们写个网页,顺带试试 Vue3。
Vue
7
star
46

LeetCode

💻 LeetCode Practice
Python
6
star
47

.github

:octocat: The default community health files for all my repos on GitHub
6
star
48

gaussian-blur

✍️ Handwritten Gaussian Blur for JavaScript. 手写一个高斯模糊。
Vue
6
star
49

hexo-tag-common

🏷️ Common tags for hexo.
JavaScript
6
star
50

baidu-image-spider

🕷️ 百度图片爬虫小工具 By Node.js.
JavaScript
5
star
51

webgl-learn

Learn WebGL Notes
JavaScript
5
star
52

awesome

😎 Custom Awesome
5
star
53

cocos-creator-ik

Cocos Creator IK Demo 逆向动力学
TypeScript
5
star
54

xiao-ai

QQ 机器人 - 小爱
Python
4
star
55

vue-parcel-demo

🌰 vue-parcel-demo
Vue
4
star
56

wives

💗 Data for my favourite girls.
TypeScript
4
star
57

valaxy-theme-starter

🎨 Starter template for valaxy-theme.
Vue
4
star
58

vue-about-me

ℹ️ Display your copyright & social links.
Vue
3
star
59

vite-bug-report-1364

https://github.com/vitejs/vite/issues/1364
Vue
2
star
60

go-far-away

🗺 Go to the farthest place. 去远方
Vue
2
star
61

nasa-vis

🌍 NASA API Visualization. (Example Asteroids - NeoWs)
Vue
2
star
62

unocss-issue-1262

Minimal repo for unocss issue #1262.
TypeScript
2
star
63

1diary-api

Guess 1diary api.
2
star
64

Advanced-Windows-Network-Programming

Lab Project about Advanced-Windows-Network-Programming
C
2
star
65

webgl-radiosity

💡 Implement radiosity by WebGL.
JavaScript
2
star
66

star-orbit

A annulus star orbit.
2
star
67

my-DIARY

MyDiary 君の名は。
Vue
2
star
68

github-stargazers

A script for getting all stargazers of a repo.
JavaScript
2
star
69

ais-json

A npm package about AIS text decoding.
JavaScript
2
star
70

umami

2
star
71

coc

Use coc(clash of clans) API to display and analyze
Vue
2
star
72

xiao-you

🔧 el-bot xiao-yun config
1
star
73

cdn

☁️ CDN by jsDelivr, for Open Source Projects.
Shell
1
star
74

element-theme-ink-preview

Preview element-theme-ink.
JavaScript
1
star
75

Accel-World

I want to design a style about accel world.
1
star
76

learn-tfjs

Learn tfjs.
1
star
77

shut-up

Shut up!
Vue
1
star
78

cg-demo

Demo for Computer Graphics.
TypeScript
1
star
79

blender-scripts

Blender Python Scripts
Python
1
star
80

bookmarks

My custom bookmarks.
1
star
81

p5-lab

Lab space for p5.js.
JavaScript
1
star
82

pac-man

Console pac-man.
HTML
1
star
83

eslint-config

🔧 My custom eslint config.
JavaScript
1
star
84

webgl-lab

Learn webgl
JavaScript
1
star
85

model-viewer-player

I want to write a controller based on google model-viewer.
1
star
86

test

TypeScript
1
star
87

ClashOfClans-GameGear

A assist web about clash of clans.Record clan information,manage your clan,calculate clan pk match value and orange lottery judge.
PHP
1
star