wbyixx

淘宝NPM镜像官网:http://npm.taobao.org/

npm config set registry=http://registry.npm.taobao.org -g

安装cnpm:

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

或者可以直接设置一个别名:

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

同步模块:

cnpm sync connect

cnpm 支持 npm 除了 publish 之外的所有命令

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2021-12-21
  • 2022-12-23
  • 2022-01-11
  • 2022-12-23
  • 2021-08-02
猜你喜欢
  • 2021-07-16
  • 2022-02-06
  • 2022-03-15
  • 2021-07-21
  • 2022-12-23
  • 2022-01-13
  • 2022-12-23
相关资源
相似解决方案