Skip to content

Commit

Permalink
更新淘宝npm镜像
Browse files Browse the repository at this point in the history
  • Loading branch information
tengge1 committed Jun 12, 2024
1 parent dad3f8f commit 96a058c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/set_proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ async function main() {
// So, we can set a proxy to make it faster to install third-party dependencies.
console.log('set nodejs proxy');
const npm = os.platform() === 'win32' ? 'npm.cmd' : 'npm';
await exec(npm, ['config', 'set', 'registry', 'https://registry.npm.taobao.org/']);
await exec(npm, ['config', 'set', 'disturl', 'https://npm.taobao.org/mirrors/node']);
await exec(npm, ['config', 'set', 'ELECTRON_MIRROR', 'http://npm.taobao.org/mirrors/electron/']);
await exec(npm, ['config', 'set', 'registry', 'https://registry.npmmirror.com']);
//await exec(npm, ['config', 'set', 'disturl', 'https://npm.taobao.org/mirrors/node']);
//await exec(npm, ['config', 'set', 'ELECTRON_MIRROR', 'http://npm.taobao.org/mirrors/electron/']);

// output current config
console.log('\ncurrent config:');
Expand Down

0 comments on commit 96a058c

Please sign in to comment.