🔧 Global formatting and update formatting

This commit is contained in:
Tw93
2025-08-05 19:53:58 +08:00
parent 467123068a
commit 7c2c68f3a6
47 changed files with 824 additions and 653 deletions

View File

@@ -56,13 +56,17 @@ export default abstract class BaseBuilder {
logger.info('✺ Located in China, using npm/rsProxy CN mirror.');
const projectCnConf = path.join(tauriSrcPath, 'rust_proxy.toml');
await fsExtra.copy(projectCnConf, projectConf);
await shellExec(`cd "${npmDirectory}" && npm install --registry=https://registry.npmmirror.com`);
await shellExec(
`cd "${npmDirectory}" && npm install --registry=https://registry.npmmirror.com`,
);
} else {
await shellExec(`cd "${npmDirectory}" && npm install`);
}
spinner.succeed(chalk.green('Package installed!'));
if (!tauriTargetPathExists) {
logger.warn('✼ The first packaging may be slow, please be patient and wait, it will be faster afterwards.');
logger.warn(
'✼ The first packaging may be slow, please be patient and wait, it will be faster afterwards.',
);
}
}
@@ -110,7 +114,16 @@ export default abstract class BaseBuilder {
return `src-tauri/target/${basePath}/bundle/`;
}
protected getBuildAppPath(npmDirectory: string, fileName: string, fileType: string): string {
return path.join(npmDirectory, this.getBasePath(), fileType.toLowerCase(), `${fileName}.${fileType}`);
protected getBuildAppPath(
npmDirectory: string,
fileName: string,
fileType: string,
): string {
return path.join(
npmDirectory,
this.getBasePath(),
fileType.toLowerCase(),
`${fileName}.${fileType}`,
);
}
}