mowatermelon / learn-es6

一个有趣的人写的有趣的前端基础
http://blog.iiwhy.cn/learn-es6
7 stars 5 forks source link

npm-nrm #115

Open mowatermelon opened 4 years ago

mowatermelon commented 4 years ago

nrm

官方仓库

https://github.com/Pana/nrm

官方npm地址

依赖包地址

https://www.npmjs.com/package/nrm

image

在线运行地址

https://npm.runkit.com/nrm

基础介绍

nrm can help you easy and fast switch between different npm registries, now include: npm, cnpm, taobao, nj(nodejitsu).

基础安装

npm install nrm --save   # npm
yarn add nrm             # Yarn

基础使用

$ npx 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 use cnpm  //switch registry to cnpm

    Registry has been set to: http://r.cnpmjs.org/

所有指令

mowatermelon commented 4 years ago

How to configure yarn to use private registry ?

just add .yarnrc in your project’s directory and write there: registry “http://your.registry

Or you can configure it in your HOME directory's .yarnrc