🔧 Improve china mirroring speed
This commit is contained in:
4
bin/builders/BaseBuilder.ts
vendored
4
bin/builders/BaseBuilder.ts
vendored
@@ -49,7 +49,7 @@ export default abstract class BaseBuilder {
|
||||
const isChina = await isChinaDomain('www.npmjs.com');
|
||||
const spinner = getSpinner('Installing package...');
|
||||
const rustProjectDir = path.join(tauriSrcPath, '.cargo');
|
||||
const projectConf = path.join(rustProjectDir, 'config');
|
||||
const projectConf = path.join(rustProjectDir, 'config.toml');
|
||||
await fsExtra.ensureDir(rustProjectDir);
|
||||
|
||||
if (isChina) {
|
||||
@@ -73,7 +73,7 @@ export default abstract class BaseBuilder {
|
||||
|
||||
async start(url: string) {
|
||||
await mergeConfig(url, this.options, tauriConfig);
|
||||
}
|
||||
}
|
||||
|
||||
async buildAndCopy(url: string, target: string) {
|
||||
const { name } = this.options;
|
||||
|
||||
@@ -1,14 +1,10 @@
|
||||
[source.crates-io]
|
||||
# To use sparse index, change 'rsproxy' to 'rsproxy-sparse'
|
||||
replace-with = 'rsproxy'
|
||||
|
||||
replace-with = 'rsproxy-sparse'
|
||||
[source.rsproxy]
|
||||
registry = "https://rsproxy.cn/crates.io-index"
|
||||
[source.rsproxy-sparse]
|
||||
registry = "sparse+https://rsproxy.cn/index/"
|
||||
|
||||
[registries.rsproxy]
|
||||
index = "https://rsproxy.cn/crates.io-index"
|
||||
|
||||
[net]
|
||||
git-fetch-with-cli = true
|
||||
|
||||
Reference in New Issue
Block a user