Created
April 15, 2017 00:17
-
-
Save holin/4ff3dd13cf64a3dc19e6c94e0049bba4 to your computer and use it in GitHub Desktop.
node js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
``` | |
方法一:使用淘宝镜像 | |
直接运行下面的命令即可: | |
SASS_BINARY_SITE=https://npm.taobao.org/mirrors/node-sass/ npm install node-sass | |
我们可能更希望能直接使用 npm install 安装所有依赖,所以我的做法是在项目内添加一个 .npmrc 文件: | |
sass_binary_site=https://npm.taobao.org/mirrors/node-sass/ | |
phantomjs_cdnurl=https://npm.taobao.org/mirrors/phantomjs/ | |
electron_mirror=https://npm.taobao.org/mirrors/electron/ | |
registry=https://registry.npm.taobao.org | |
这样使用 npm install 安装 node-sass、electron 和 phantomjs 时都能自动从淘宝源上下载,但是在使用 npm publish 的时候要把 registry 这一行给注释掉,否则就会发布到淘宝源上去了。 | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment