安装yarn
npm install -g yarn --registry=https://registry.npm.taobao.org
ln -s /usr/local/nodejs/bin/yarn /usr/local/bin
获取配置
# yarn config get registry
https://registry.yarnpkg.com
设置配置
# yarn config set registry https://registry.npm.taobao.org -g
yarn config v1.22.4
success Set "registry" to "https://registry.npm.taobao.org".
Done in 0.03s.
# yarn config set sass_binary_site http://cdn.npm.taobao.org/dist/node-sass -g
yarn config v1.22.4
success Set "sass_binary_site" to "http://cdn.npm.taobao.org/dist/node-sass".
Done in 0.03s.