Node.js/npm/源:修订间差异

来自康健生活
Kangkk​(留言 | 贡献)
Kangkk​(留言 | 贡献)
 
(未显示同一用户的3个中间版本)
第34行: 第34行:
进行分开测试
进行分开测试
{{shc|<syntaxhighlight lang="bash">
{{shc|<syntaxhighlight lang="bash">
npm config set @q:registry http://registry.npm.qiwoo.org
npm config set @q:registry http://registry.npm.qiwoo.org \\
npm install --registry=https://registry.npmmirror.com</syntaxhighlight>|$|/home/kangkk}}
&& npm install --registry=https://registry.npmmirror.com</syntaxhighlight>|$|/home/kangkk}}


=== nrm ===
=== nrm ===
第57行: 第57行:
Registry has been set to: https://registry.npm.taobao.org/
Registry has been set to: https://registry.npm.taobao.org/
</syntaxhighlight>|kangjian@kangkk:~/github/kangkk.github.io$}}
</syntaxhighlight>|kangjian@kangkk:~/github/kangkk.github.io$}}
==== add ====
 
添加额外的源,自定义源
 
{{Shc_out|<syntaxhighlight lang="bash">
{{Shc_out|<syntaxhighlight lang="bash">
nrm add company http://registry.npm.qiwoo.org</syntaxhighlight>|<syntaxhighlight lang="bash">
nrm add company http://registry.npm.qiwoo.org</syntaxhighlight>|<syntaxhighlight lang="bash">
 
add registry company success
    add registry company success
</syntaxhighlight>|$|/home/kangkk}}
</syntaxhighlight>|$|/home/kangkk}}
== .npmrc ==
{{hc|.npmrc|<syntaxhighlight lang="text">
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</syntaxhighlight>}}
根据域设置单独源
{{hc|head=.npmrc|output=<syntaxhighlight lang="text">
registry=https://registry.nlark.com/
@q:registry=http://registry.npm.qiwoo.org</syntaxhighlight>}}
=== 源工具 ===
==== mirror-config-china ====
==== mirror-config-china ====
{{shc|<syntaxhighlight lang="bash">
{{shc|<syntaxhighlight lang="bash">
第89行: 第77行:
{{shc|<syntaxhighlight lang="bash">
{{shc|<syntaxhighlight lang="bash">
mirror-config-china --registry=https://registry.npmmirror.com</syntaxhighlight>|$|/home/kangkk}}
mirror-config-china --registry=https://registry.npmmirror.com</syntaxhighlight>|$|/home/kangkk}}
== .npmrc ==
{{hc|.npmrc|<syntaxhighlight lang="text">
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</syntaxhighlight>}}
根据域设置单独源
{{hc|head=.npmrc|output=<syntaxhighlight lang="text">
registry=https://registry.nlark.com/
@q:registry=http://registry.npm.qiwoo.org</syntaxhighlight>}}