Node: Use nrm management npm source

I. Introduction

npm is a very easy to use package management tool, often npm install other files in the package will be used in front-end development. However, when you install some packages to install npm sometimes very slow, because the source npm managed some abroad, package download time takes a lot of time even required over the wall. Of course, the domestic developers common approach is to modify npm source, change it to domestic sources, such as Taobao. Here, I have this to say nrm tool that can manage all sources npm can also switch the source of support and so on, now to look nrm use.

 

Second, the installation

1, the installation nrm

//安装
npm install nrm -g

//安装结果如下:
npm WARN deprecated [email protected]: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
/usr/local/bin/nrm -> /usr/local/lib/node_modules/nrm/cli.js
+ [email protected]
added 489 packages from 861 contributors in 11.043s

2, nrm commonly used commands

// NRM commonly used commands    
nrm ls                                            to list all sources 
nrm current                                       view source currently in use 
NRM use <Registry>                                switching source 
NRM the Add <Registry> <url> [Home]                  add custom source [usually add their own proprietary source ] 
NRM sET -auth [Options] <Registry> [value]         to verify the settings defined from the source 
NRM sET -email <Registry> <value>                  to the custom message source disposed 
NRM sET -hosted the repo-<Registry> <value>            It is provided to the source host custom repository  
NRM del <Registry>                               Delete a custom source 
NRM Home <Registry> [Browser]                     browser ah open the home page source 
NRM publish [Options] [ <tarball> | <Folder> ] Pub   custom source distribution package 
nrm [registry] test                               test source          

3, the test is as follows

 

Guess you like

Origin www.cnblogs.com/XYQ-208910/p/12114674.html