cnpm 将 node-sass 也镜像了
使用了 node-sass 的同学有福了,cnpm 将 node-sass 的二进制文件也从 github 镜像到 taobao npm 了。https://github.com/cnpm/cnpm/pull/76
这样大家就能通过 cnpm install node-sass 快速地安装了。
cnpm i node-sass
从原来的需要 build,到现在 20s 就安装完了。
before:
time tnpm i node-sass --no-cache
\
> [email protected] postinstall /private/tmp/node_modules/node-sass/node_modules/cross-spawn/node_modules/spawn-sync
> node postinstall
|
> [email protected] install /private/tmp/node_modules/node-sass
> node scripts/install.js
Cannot download "https://github.com/sass/node-sass/releases/download/v3.4.1/darwin-x64-46_binding.node":
read ECONNRESET
Hint: If github.com is not accessible in your location
try setting a proxy via HTTP_PROXY, e.g.
export HTTP_PROXY=http://example.com:1234
or configure npm proxy via
npm config set proxy http://example.com:8080
> [email protected] postinstall /private/tmp/node_modules/node-sass
> node scripts/build.js
after:
[tnpm] Finish 22s json/tgz: 0/173, size/speed 2.35MB/479.6kB/s, total/keepalive/queue: 173/0/0
real 0m22.982s
user 0m12.398s
sys 0m2.641s
2 回复
PS:如果有人需要使用 npm@3 版本的 cnpm,可以通过 cnpm i cnpm@beta
安装到。
cnpm dist-tag ls cnpm
beta: 4.1.0
latest: 3.3.0