npm与yarn的一些常用命令
npm
查看所有高级的npm moudles
npm list --depth=0
查看所有全局安装的模块
npm list --depth=0 -global
查看配置
npm config get registry
npm设置淘宝镜像:
npm config set registry http://registry.npm.taobao.org/
npm还原仓库地址:
npm config set registry https://registry.npmjs.org/
yarn
npm安装yarn
npm install -g yarn
查看配置
yarn config list
查看一下当前源
yarn config get registry
切换为淘宝源
yarn config set registry https://registry.npm.taobao.org/
或者切换为自带的
yarn config set registry https://registry.yarnpkg.com
设置phantomjs的源地址
yarn config set phantomjs_cdnurl https://npm.taobao.org/mirrors/phantomjs

浙公网安备 33010602011771号