大家好,又见面了,我是你们的朋友全栈君。
2021-11-21 16:53:52 npm淘宝镜像更换新域名
新域名为淘宝 NPM 镜像
新版本使用镜像有以下两种方式:
1.你可以使用我们定制的 cnpm (gzip 压缩支持) 命令行工具代替默认的 npm
:
$ npm install -g cnpm --registry=https://registry.npmmirror.com
2.或者你直接通过添加 npm
参数 alias
一个新命令:
alias cnpm="npm --registry=https://registry.npmmirror.com \
--cache=$HOME/.npm/.cache/cnpm \
--disturl=https://npmmirror.com/dist \
--userconfig=$HOME/.cnpmrc"
# Or alias it in .bashrc or .zshrc
$ echo '\n#alias for cnpm\nalias cnpm="npm --registry=https://registry.npmmirror.com \
--cache=$HOME/.npm/.cache/cnpm \
--disturl=https://npmmirror.com/dist \
--userconfig=$HOME/.cnpmrc"' >> ~/.zshrc && source ~/.zshrc
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。
发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/128460.html原文链接:https://javaforall.net