备忘 大部分来自:https://github.com/ly525/luban-h5/blob/dev/deploy/mirror.sh

    1. # ==========================================================
    2. # NPM
    3. # ==========================================================
    4. npm set registry "https://registry.npm.taobao.org"
    5. npm set disturl "https://npm.taobao.org/dist"
    6. npm set chromedriver-cdnurl "https://npm.taobao.org/mirrors/chromedriver"
    7. npm set couchbase-binary-host-mirror "https://npm.taobao.org/mirrors/couchbase/v{version}"
    8. npm set debug-binary-host-mirror "https://npm.taobao.org/mirrors/node-inspector"
    9. npm set electron-mirror "https://npm.taobao.org/mirrors/electron/"
    10. npm set flow-bin-binary-host-mirror "https://npm.taobao.org/mirrors/flow/v"
    11. npm set fse-binary-host-mirror "https://npm.taobao.org/mirrors/fsevents"
    12. npm set fuse-bindings-binary-host-mirror "https://npm.taobao.org/mirrors/fuse-bindings/v{version}"
    13. npm set git4win-mirror "https://npm.taobao.org/mirrors/git-for-windows"
    14. npm set gl-binary-host-mirror "https://npm.taobao.org/mirrors/gl/v{version}"
    15. npm set grpc-node-binary-host-mirror "https://npm.taobao.org/mirrors"
    16. npm set hackrf-binary-host-mirror "https://npm.taobao.org/mirrors/hackrf/v{version}"
    17. npm set leveldown-binary-host-mirror "https://npm.taobao.org/mirrors/leveldown/v{version}"
    18. npm set leveldown-hyper-binary-host-mirror "https://npm.taobao.org/mirrors/leveldown-hyper/v{version}"
    19. npm set mknod-binary-host-mirror "https://npm.taobao.org/mirrors/mknod/v{version}"
    20. npm set node-sqlite3-binary-host-mirror "https://npm.taobao.org/mirrors"
    21. npm set node-tk5-binary-host-mirror "https://npm.taobao.org/mirrors/node-tk5/v{version}"
    22. npm set nodegit-binary-host-mirror "https://npm.taobao.org/mirrors/nodegit/v{version}/"
    23. npm set operadriver-cdnurl "https://npm.taobao.org/mirrors/operadriver"
    24. npm set phantomjs-cdnurl "https://npm.taobao.org/mirrors/phantomjs"
    25. npm set profiler-binary-host-mirror "https://npm.taobao.org/mirrors/node-inspector/"
    26. npm set puppeteer-download-host "https://npm.taobao.org/mirrors"
    27. npm set python-mirror "https://npm.taobao.org/mirrors/python"
    28. npm set rabin-binary-host-mirror "https://npm.taobao.org/mirrors/rabin/v{version}"
    29. npm set sass-binary-site "https://npm.taobao.org/mirrors/node-sass"
    30. npm set sodium-prebuilt-binary-host-mirror "https://npm.taobao.org/mirrors/sodium-prebuilt/v{version}"
    31. npm set sqlite3-binary-site "https://npm.taobao.org/mirrors/sqlite3"
    32. npm set utf-8-validate-binary-host-mirror "https://npm.taobao.org/mirrors/utf-8-validate/v{version}"
    33. npm set utp-native-binary-host-mirror "https://npm.taobao.org/mirrors/utp-native/v{version}"
    34. npm set zmq-prebuilt-binary-host-mirror "https://npm.taobao.org/mirrors/zmq-prebuilt/v{version}"
    35. npm cache clean --force # clean npm cache
    36. # ==========================================================
    37. # YARN
    38. # ==========================================================
    39. yarn config set registry "https://registry.npm.taobao.org"
    40. yarn config set disturl "https://npm.taobao.org/dist"
    41. yarn config set chromedriver-cdnurl "https://npm.taobao.org/mirrors/chromedriver"
    42. yarn config set couchbase-binary-host-mirror "https://npm.taobao.org/mirrors/couchbase/v{version}"
    43. yarn config set debug-binary-host-mirror "https://npm.taobao.org/mirrors/node-inspector"
    44. yarn config set electron-mirror "https://npm.taobao.org/mirrors/electron/"
    45. yarn config set flow-bin-binary-host-mirror "https://npm.taobao.org/mirrors/flow/v"
    46. yarn config set fse-binary-host-mirror "https://npm.taobao.org/mirrors/fsevents"
    47. yarn config set fuse-bindings-binary-host-mirror "https://npm.taobao.org/mirrors/fuse-bindings/v{version}"
    48. yarn config set git4win-mirror "https://npm.taobao.org/mirrors/git-for-windows"
    49. yarn config set gl-binary-host-mirror "https://npm.taobao.org/mirrors/gl/v{version}"
    50. yarn config set grpc-node-binary-host-mirror "https://npm.taobao.org/mirrors"
    51. yarn config set hackrf-binary-host-mirror "https://npm.taobao.org/mirrors/hackrf/v{version}"
    52. yarn config set leveldown-binary-host-mirror "https://npm.taobao.org/mirrors/leveldown/v{version}"
    53. yarn config set leveldown-hyper-binary-host-mirror "https://npm.taobao.org/mirrors/leveldown-hyper/v{version}"
    54. yarn config set mknod-binary-host-mirror "https://npm.taobao.org/mirrors/mknod/v{version}"
    55. yarn config set node-sqlite3-binary-host-mirror "https://npm.taobao.org/mirrors"
    56. yarn config set node-tk5-binary-host-mirror "https://npm.taobao.org/mirrors/node-tk5/v{version}"
    57. yarn config set nodegit-binary-host-mirror "https://npm.taobao.org/mirrors/nodegit/v{version}/"
    58. yarn config set operadriver-cdnurl "https://npm.taobao.org/mirrors/operadriver"
    59. yarn config set phantomjs-cdnurl "https://npm.taobao.org/mirrors/phantomjs"
    60. yarn config set profiler-binary-host-mirror "https://npm.taobao.org/mirrors/node-inspector/"
    61. yarn config set puppeteer-download-host "https://npm.taobao.org/mirrors"
    62. yarn config set python-mirror "https://npm.taobao.org/mirrors/python"
    63. yarn config set rabin-binary-host-mirror "https://npm.taobao.org/mirrors/rabin/v{version}"
    64. yarn config set sass-binary-site "https://npm.taobao.org/mirrors/node-sass"
    65. yarn config set sodium-prebuilt-binary-host-mirror "https://npm.taobao.org/mirrors/sodium-prebuilt/v{version}"
    66. yarn config set sqlite3-binary-site "https://npm.taobao.org/mirrors/sqlite3"
    67. yarn config set utf-8-validate-binary-host-mirror "https://npm.taobao.org/mirrors/utf-8-validate/v{version}"
    68. yarn config set utp-native-binary-host-mirror "https://npm.taobao.org/mirrors/utp-native/v{version}"
    69. yarn config set zmq-prebuilt-binary-host-mirror "https://npm.taobao.org/mirrors/zmq-prebuilt/v{version}"
    70. yarn cache clean # clean yarn cache