From 0540b627e19f96fc99ab3119f18099daec008d7f Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Wed, 28 Dec 2022 22:59:39 -0600 Subject: [PATCH] Move translationRunner under scripts/ --- package.json | 2 +- translationRunner.ts => scripts/translationRunner.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename translationRunner.ts => scripts/translationRunner.ts (99%) diff --git a/package.json b/package.json index abc321f7c..70b397c0e 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "dev": "${npm_execpath} run start", "build": "npx webpack", "jsdoc": "npx jsdoc -c jsdoc.conf.js", - "manage:translations": "npx ts-node ./translationRunner.ts", + "manage:translations": "npx ts-node ./scripts/translationRunner.ts", "test": "npx cross-env NODE_ENV=test npx jest", "test:coverage": "${npm_execpath} run test --coverage", "test:all": "${npm_execpath} run test:coverage && ${npm_execpath} run lint", diff --git a/translationRunner.ts b/scripts/translationRunner.ts similarity index 99% rename from translationRunner.ts rename to scripts/translationRunner.ts index c4994648b..3c9b5893d 100644 --- a/translationRunner.ts +++ b/scripts/translationRunner.ts @@ -13,7 +13,7 @@ interface LanguageResult { const RFC5646_REGEXP = /^[a-z]{2,3}(?:-(?:x|[A-Za-z]{2,4}))*$/; -const rootDirectory = path.resolve(__dirname); +const rootDirectory = path.resolve(__dirname, '..'); const translationsDirectory = path.resolve(rootDirectory, 'app', 'soapbox', 'locales'); const messagesDirectory = path.resolve(rootDirectory, 'build', 'messages'); const availableLanguages = fs.readdirSync(translationsDirectory).reduce((languages, filename) => {