fix: module not find
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
// cSpell:ignore Tolgee
|
// cSpell:ignore Tolgee
|
||||||
import { fetchTolgee } from './request';
|
import { fetchTolgee } from './request.js';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns all project languages
|
* Returns all project languages
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
import fs from 'node:fs/promises';
|
import fs from 'node:fs/promises';
|
||||||
import path from 'node:path';
|
import path from 'node:path';
|
||||||
import { format } from 'prettier';
|
import { format } from 'prettier';
|
||||||
import { getAllProjectLanguages, getRemoteTranslations } from './api';
|
import { getAllProjectLanguages, getRemoteTranslations } from './api.js';
|
||||||
import type { TranslationRes } from './utils';
|
import type { TranslationRes } from './utils.js';
|
||||||
|
|
||||||
const RES_DIR = path.resolve(process.cwd(), 'src', 'resources');
|
const RES_DIR = path.resolve(process.cwd(), 'src', 'resources');
|
||||||
|
|
||||||
@@ -66,7 +66,7 @@ const main = async () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const availableLanguages = languagesWithTranslations.filter(
|
const availableLanguages = languagesWithTranslations.filter(
|
||||||
language => language.completeRate > 0
|
language => language.completeRate === 1
|
||||||
);
|
);
|
||||||
|
|
||||||
availableLanguages
|
availableLanguages
|
||||||
@@ -90,7 +90,7 @@ const main = async () => {
|
|||||||
console.log('Generating meta data...');
|
console.log('Generating meta data...');
|
||||||
const code = `// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
const code = `// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||||
// Run \`pnpm run download-resources\` to regenerate.
|
// Run \`pnpm run download-resources\` to regenerate.
|
||||||
// To overwrite this, please overwrite ${path.basename(__filename)}
|
// To overwrite this, please overwrite download.ts script.
|
||||||
${availableLanguages
|
${availableLanguages
|
||||||
.map(
|
.map(
|
||||||
language =>
|
language =>
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
// cSpell:ignore Tolgee
|
// cSpell:ignore Tolgee
|
||||||
import { readFile } from 'fs/promises';
|
import { readFile } from 'fs/promises';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import { createsNewKey, getRemoteTranslations } from './api';
|
import { createsNewKey, getRemoteTranslations } from './api.js';
|
||||||
import type { TranslationRes } from './utils';
|
import type { TranslationRes } from './utils.js';
|
||||||
|
|
||||||
const BASE_JSON_PATH = path.resolve(
|
const BASE_JSON_PATH = path.resolve(
|
||||||
process.cwd(),
|
process.cwd(),
|
||||||
|
|||||||
Reference in New Issue
Block a user