npm的本地缓存npm_lazy方案

具体安装流程参考官网:
1.http://mixu.net/npm_lazy/#installation
2.http://mixu.net/npm_lazy/#configuration

1.安装
npm install -g npm_lazy
2.修改配置,其路径为AppData\Roaming\npm\node_modules\npm_lazy\config.js。
  // external url to npm_lazy, no trailing /
  externalUrl: 'http://localhost:8972',
  // registry url with trailing /
  // remoteUrl: 'https://registry.npmjs.com/',
  remoteUrl: 'https://registry.npm.taobao.org/',
  // bind port and host
  port: 8972,
  host: '0.0.0.0',
3.启动服务
npm_lazy
4.配置npm的镜像路径为。
 // npm config set registry https://registry.npm.taobao.org
 npm config set registry http://localhost:8972
5.npm install

检查是否成功