Yarn的registry切换工具
发布于 9 年前 作者 huangyanxiong01 9296 次浏览 来自 分享

编写了个Yarn的registry工具,欢迎大家使用,贡献你们的代码,windows还没有测试,如果可以留言或者创建issue 源码 Github

yrs

Yarn registry switch tool

Install

yarn global add yrs

OR

 npm install -g yrs

Example

yrs ls
name registry home 
npm https://registry.npmjs.org https://www.npmjs.org 
cnpm http://r.cnpmjs.org http://cnpmjs.org 
taobao https://registry.npm.taobao.org https://npm.taobao.org 
nj https://registry.nodejitsu.com https://www.nodejitsu.com 
rednpm http://registry.mirror.cqupt.edu.cn http://npm.mirror.cqupt.edu.cn/ 
npmMirror https://skimdb.npmjs.com/registry https://skimdb.npmjs.com/ 
edunpm http://registry.enpmjs.org http://www.enpmjs.org 
yrs use taobao
yarn config v0.17.6
success Set "registry" to "https://registry.npm.taobao.org".
Done in 0.03s. 

Usage


 Usage: yrs [options] [command]
 Commands:
 current Show current registry name
 ls List all the registries
 use <registryName> Change registry to registry
 add <registryName> <url> [home] Add one custom registry
 del <registryName> Delete one custom registry
 * Any
 Options:
 -h, --help output usage information
 -V, --version output the version number

TODO

  • [ ] Test
  • [ ] travis CI

开发环境

6 回复

nrm也可以直接切换吧?

@andyhu 不可以,yrm可以

来自酷炫的 CNodeMD

@andyhu nrm是npm的registry切换工具

@i5ting 原来狼叔写了个了😂😂

@huangyanxiong01 fork nrm的,就写了一个文件就搞定了,哇哈哈

真不是切换registry那么简单,可以试试 yarn i grpc 自豪地采用 CNodeJS ionic

回到顶部

AltStyle によって変換されたページ (->オリジナル) /