1. npm 快速入门

淘宝 NPM 镜像

npm install --registry=https://registry.npm.taobao.org

--registry=https://registry.npm.taobao.org

  • install
npm install -g cnpm --registry=https://registry.npm.taobao.org
  • config
alias cnpm="npm --registry=https://registry.npm.taobao.org \
--cache=$HOME/.npm/.cache/cnpm \
--disturl=https://npm.taobao.org/dist \
--userconfig=$HOME/.cnpmrc"
# Or alias it in .bashrc or .zshrc
echo '\n#alias for cnpm\nalias cnpm="npm --registry=https://registry.npm.taobao.org \
  --cache=$HOME/.npm/.cache/cnpm \
  --disturl=https://npm.taobao.org/dist \
  --userconfig=$HOME/.cnpmrc"' >> ~/.zshrc && source ~/.zshrc
作者: 雪之梦技术驿站
链接: https://snowdreams1006.github.io/todo/npm.html
来源: 雪之梦技术驿站
本文原创发布于「雪之梦技术驿站」,转载请注明出处,谢谢合作!

https://snowdreams1006.github.io/snowdreams1006-wechat-open.png

© snowdreams1006 all right reserved,powered by Gitbook文件修订时间: 2020-09-19 00:53:19

results matching ""

    No results matching ""