Skip to content

Commit

Permalink
remove rimraf
Browse files Browse the repository at this point in the history
  • Loading branch information
achou11 committed Jan 22, 2025
1 parent 45591e5 commit 014c4ef
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 30 deletions.
20 changes: 0 additions & 20 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@
"prettier": "3.2.5",
"react-native-svg-transformer": "1.3.0",
"react-test-renderer": "18.2.0",
"rimraf": "5.0.5",
"semver": "7.6.0",
"type-fest": "4.26.0",
"typescript": "5.3.3"
Expand Down
11 changes: 2 additions & 9 deletions scripts/build-translations.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import path from 'node:path';
import fs from 'node:fs';
import {readFile, writeFile} from 'node:fs/promises';
import {glob} from 'glob';
import {rimraf} from 'rimraf';

import LANGUAGE_NAME_TRANSLATIONS from '../src/frontend/languages.json' assert {type: 'json'};

Expand All @@ -19,14 +18,8 @@ const TRANSLATIONS_OUTPUT_PATH = path.join(
await run();

async function run() {
// We want to preserve the translations/ directory
await rimraf(`${TRANSLATIONS_DIR_PATH}/*`, {glob: true, preserveRoot: true});

try {
fs.mkdirSync(TRANSLATIONS_DIR_PATH);
} catch (_) {
// Translations directory already exists
}
fs.rmSync(TRANSLATIONS_DIR_PATH, {force: true, recursive: true});
fs.mkdirSync(TRANSLATIONS_DIR_PATH);

const messages = await loadMessages();
const translations = convertMessagesToTranslations(messages);
Expand Down

0 comments on commit 014c4ef

Please sign in to comment.