mirror of
https://iceshrimp.dev/Crimekillz/jointrashposs.git
synced 2024-11-22 00:43:50 +01:00
(fix) Crowdin APIキーがない環境でビルドに失敗する
This commit is contained in:
parent
240f337f7b
commit
e9f972d5be
@ -35,7 +35,17 @@ type CrowdinProjectMember = {
|
||||
|
||||
//@ts-ignore
|
||||
export async function fetchCrowdinMembers() {
|
||||
const sourceFilePath = path.resolve(__dirname, '../assets/data/i18n-members.ts');
|
||||
const tsOut = [
|
||||
'/** This file is auto-generated */',
|
||||
'import type { LocaleCodes } from \'@/assets/data/locales\';',
|
||||
'import type { PartialRecord } from \'@/types/others\';',
|
||||
'import type { MiHubMember } from \'./team-members\';',
|
||||
];
|
||||
|
||||
if (!process.env.CROWDIN_INTG_API) {
|
||||
tsOut.push('export const hubI18nMembers: PartialRecord<LocaleCodes, MiHubMember[]> = {};');
|
||||
writeFileSync(sourceFilePath, tsOut.join('\n'));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -71,13 +81,6 @@ export async function fetchCrowdinMembers() {
|
||||
|
||||
}
|
||||
|
||||
const sourceFilePath = path.resolve(__dirname, '../assets/data/i18n-members.ts');
|
||||
const tsOut = [
|
||||
'/** This file is auto-generated */',
|
||||
'import type { LocaleCodes } from \'@/assets/data/locales\';',
|
||||
'import type { PartialRecord } from \'@/types/others\';',
|
||||
'import type { MiHubMember } from \'./team-members\';',
|
||||
];
|
||||
tsOut.push(`export const hubI18nMembers: PartialRecord<LocaleCodes, MiHubMember[]> = ${JSON.stringify(out)};`);
|
||||
writeFileSync(sourceFilePath, tsOut.join('\n'));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user