NPM加速
yarn
命令行
yarn config set "sass_binary_site" "http://cdn.npm.taobao.org/dist/node-sass"
yarn config set "@xxxxx:registry" "https://registry-npm.xxxxx.com"
yarn config set "registry" "https://registry.npm.taobao.org/"
.yarnrc
"registry" "https://registry.npm.taobao.org/"
"@xxxxx:registry" "https://registry-npm.xxxxx.com"
"sass_binary_site" "http://cdn.npm.taobao.org/dist/node-sass"
npm
命令行
npm config set "sass_binary_site" "http://cdn.npm.taobao.org/dist/node-sass"
npm config set "@xxxxx:registry" "https://registry-npm.xxxxx.com"
npm config set "registry" "https://registry.npm.taobao.org/"
.npmrc
"registry"="https://registry.npm.taobao.org/"
"sass_binary_site"="http://cdn.npm.taobao.org/dist/node-sass"
"@xxxxx:registry"="https://registry-npm.xxxxx.com"
查看配置
npm config list
; "user" config from /Users/shang/.npmrc
//registry.npmjs.com/:_authToken = (protected)
electron_mirror = "https://npm.taobao.org/mirrors/electron/"
profiler_binary_host_mirror = "https://npm.taobao.org/mirrors/node-inspector/"
; registry = "https://registry.npm.taobao.org/" ; overridden by project
sass_binary_site = "https://npm.taobao.org/mirrors/node-sass/phantomjs_cdn"
sqlite3_binary_host_mirror = "https://foxgis.oss-cn-shanghai.aliyuncs.com/"
url = "http://cnpmjs.org/downloads"
; "project" config from /Users/shang/Code/kmos/kmos/.npmrc
@xxxxxx:registry = "https://registry-npm.xxxxxx.com"
registry = "https://registry.npm.taobao.org/"
; node bin location = /usr/local/bin/node
; cwd = /Users/shang/Code/kmos/kmos
; HOME = /Users/shang
; Run `npm config ls -l` to show all defaults.
yarn config list
yarn config v1.22.17
info yarn config
{
'version-tag-prefix': 'v',
'version-git-tag': true,
'version-commit-hooks': true,
'version-git-sign': false,
'version-git-message': 'v%s',
'init-version': '1.0.0',
'init-license': 'MIT',
'save-prefix': '^',
'bin-links': true,
'ignore-scripts': false,
'ignore-optional': false,
registry: 'https://registry.npm.taobao.org/',
'strict-ssl': true,
'user-agent': 'yarn/1.22.17 npm/? node/v16.13.1 darwin x64',
'@base:registry': 'https://registry-npm.xxxxxx.com',
'@xxxxxx:registry': 'https://registry-npm.xxxxxx.com',
lastUpdateCheck: 1644378532337,
sass_binary_site: 'http://cdn.npm.taobao.org/dist/node-sass',
'omit.js': 'https://registry.npmjs.org/omit.js',
'@ant-design:registry': 'https://registry.npm.taobao.org'
}
info npm config
{
registry: 'https://registry.npm.taobao.org',
sass_binary_site: 'https://npm.taobao.org/mirrors/node-sass/phantomjs_cdn',
url: 'http://cnpmjs.org/downloads',
electron_mirror: 'https://npm.taobao.org/mirrors/electron/',
sqlite3_binary_host_mirror: 'https://foxgis.oss-cn-shanghai.aliyuncs.com/',
profiler_binary_host_mirror: 'https://npm.taobao.org/mirrors/node-inspector/',
'//registry.npmjs.com/:_authToken': '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',
'@xxxxxx:registry': 'https://registry-npm.xxxxxx.com'
}