refactor: add index.js to translations-cli, add translations:extract to package.json

This commit is contained in:
Nybkox
2025-02-19 12:19:18 +01:00
parent 84bd81e525
commit 1c6ec0f8e3
3 changed files with 6 additions and 2 deletions

View File

@@ -0,0 +1,3 @@
const { program } = require('./program');
program.parse();

View File

@@ -19,7 +19,7 @@ const { extractAllTranslations } = require('./extract');
const defaultConfig = {
extensions: ['.js', '.ts', '.svelte'],
directories: ['app', 'packages/web'],
outputFile: './translations/en.json',
outputFile: './translations/en-US.json',
};
program.name('dbgate-translations-cli').description('CLI tool for managing translation').version('1.0.0');
@@ -86,4 +86,4 @@ program
}
});
program.parse();
module.exports = { program };

View File

@@ -68,6 +68,7 @@
"dbgate-serve": "node packages/dbgate/bin/dbgate-serve.js",
"workflows": "node common/processWorkflows.js",
"cy:open": "cd e2e-tests && yarn cy:open"
"translations:extract": "node common/translations-cli/index.js extract"
},
"dependencies": {
"concurrently": "^5.1.0",