==========================================================
NPM
==========================================================
npm set registry https://r.npm.taobao.org # 注冊模塊鏡像
npm set disturl https://npm.taobao.org/dist # node-gyp 編譯依賴的 node 源碼鏡像
以下選擇添加
npm set sass_binary_site https://npm.taobao.org/mirrors/node-sass # node-sass 二進(jìn)制包鏡像
npm set electron_mirror https://npm.taobao.org/mirrors/electron/ # electron 二進(jìn)制包鏡像
npm set puppeteer_download_host https://npm.taobao.org/mirrors # puppeteer 二進(jìn)制包鏡像
npm set chromedriver_cdnurl https://npm.taobao.org/mirrors/chromedriver # chromedriver 二進(jìn)制包鏡像
npm set operadriver_cdnurl https://npm.taobao.org/mirrors/operadriver # operadriver 二進(jìn)制包鏡像
npm set phantomjs_cdnurl https://npm.taobao.org/mirrors/phantomjs # phantomjs 二進(jìn)制包鏡像
npm set selenium_cdnurl https://npm.taobao.org/mirrors/selenium # selenium 二進(jìn)制包鏡像
npm set node_inspector_cdnurl https://npm.taobao.org/mirrors/node-inspector # node-inspector 二進(jìn)制包鏡像
npm cache clean --force # 清空緩存
==========================================================
YARN
==========================================================
yarn config set registry https://r.npm.taobao.org # 注冊模塊鏡像
yarn config set disturl https://npm.taobao.org/dist # node-gyp 編譯依賴的 node 源碼鏡像
以下選擇添加
yarn config set sass_binary_site https://npm.taobao.org/mirrors/node-sass # node-sass 二進(jìn)制包鏡像
yarn config set electron_mirror https://npm.taobao.org/mirrors/electron/ # electron 二進(jìn)制包鏡像
yarn config set puppeteer_download_host https://npm.taobao.org/mirrors # puppeteer 二進(jìn)制包鏡像
yarn config set chromedriver_cdnurl https://npm.taobao.org/mirrors/chromedriver # chromedriver 二進(jìn)制包鏡像
yarn config set operadriver_cdnurl https://npm.taobao.org/mirrors/operadriver # operadriver 二進(jìn)制包鏡像
yarn config set phantomjs_cdnurl https://npm.taobao.org/mirrors/phantomjs # phantomjs 二進(jìn)制包鏡像
yarn config set selenium_cdnurl https://npm.taobao.org/mirrors/selenium # selenium 二進(jìn)制包鏡像
yarn config set node_inspector_cdnurl https://npm.taobao.org/mirrors/node-inspector # node-inspector 二進(jìn)制包鏡像
yarn cache clean # 清空緩存
https://gist.github.com/lvxianchao/2dcba1a93422037273dd41a924ddaab9