美文网首页我爱编程
npm基本配置(持续补充中)

npm基本配置(持续补充中)

作者: 春木橙云 | 来源:发表于2017-07-17 09:05 被阅读37次

    本设置的目的是为了让npm下载得更快速!

    • 运行 npm config set loglevel http——让你知道 npm 发的每一个请求
    • 运行 npm config set progress false——关闭那个无聊的进度条
    • 运行 npm config set registry https://registry.npm.taobao.org/——从淘宝的服务器下载各种包。不过这会让你在运行 npm adduser 的时候出问题,想要恢复成原样,只需要运行 npm config delete registry 即可。
    • 运行 touch ~/.bashrc; echo 'export PHANTOMJS_CDNURL="http://npm.taobao.org/mirrors/phantomjs"' >> ~/.bashrc ——让 npm 从淘宝下载 phantomjs
    • 运行 touch ~/.bashrc; echo 'export SASS_BINARY_SITE="https://npm.taobao.org/mirrors/node-sass"' >> ~/.bashrc ——让 npm 从淘宝下载 SASS
    • 运行 source ~/.bashrc

    相关文章

      网友评论

        本文标题:npm基本配置(持续补充中)

        本文链接:https://www.haomeiwen.com/subject/kpcfkxtx.html