nrm & cnpm All In One
nrm & cnpm All In One
$ 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 -h
Usage: nrm [options] [command]
Options:
-V, --version output the version number
-h, --help output usage information
Commands:
ls List all the registries
current Show current registry name
use <registry> Change registry to registry
add <registry> <url> [home] Add one custom registry
set-auth [options] <registry> [value] Set authorize information for a custom registry with a base64 encoded string or username and pasword
set-email <registry> <value> Set email for a custom registry
set-hosted-repo <registry> <value> Set hosted npm repository for a custom registry to publish packages
del <registry> Delete one custom registry
home <registry> [browser] Open the homepage of registry with optional browser
publish [options] [<tarball>|<folder>] Publish package to current registry if current registry is a custom registry.
if you're not using custom registry, this command will run npm publish directly
test [registry] Show response time for specific or all registries
help Print this help
nrm
# npm 切换到 xnpm ✅ 👍
$ nrm ls
# 注册 add <registry> <url> [home]
$ nrm add xnpm https://registry-cnpm.xgqfrms.xyz
$ nrm use xnpm
# install all
$ npm i
# install @xgqfrms/xui
$ npm i @xgqfrms/xui
# alias, install
# $ xnpm i @xgqfrms/xui
# 默认 -S
# $ xnpm install @xgqfrms/xui
# $ xnpm install @xgqfrms/xui -S
# $ xnpm install @xgqfrms/xui --save
cnpm
# npm 切换到 cnpm ✅👎
$ npm install -g cnpm --registry=https://registry.npm.taobao.org
$ cnpm config set registry https://registry-cnpm.xgqfrms.xyz
$ cnpm install @xgqfrms/xui --save
$ cnpm install @xgqfrms/xui -S
# 默认 -S
$ cnpm install @xgqfrms/xui
refs
©xgqfrms 2012-2020
www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!
原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!
本文首发于博客园,作者:xgqfrms,原文链接:https://www.cnblogs.com/xgqfrms/p/14830840.html
未经授权禁止转载,违者必究!