From 853be6bb996fd0ece845a1ed3304a4514868d4a2 Mon Sep 17 00:00:00 2001 From: EGJ-Moorington Date: Thu, 30 Jul 2026 01:13:58 +0200 Subject: [PATCH 1/2] Modified `deploy-ui.mjs` to handle i18n Modified the script `deploy-ui.mjs` so that it can also parse multiple localisations built using `@angular/localize`. --- deploy-ui.mjs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/deploy-ui.mjs b/deploy-ui.mjs index daa52e9..05f77ea 100644 --- a/deploy-ui.mjs +++ b/deploy-ui.mjs @@ -21,16 +21,18 @@ import process from 'process'; const cwd = process.cwd(); const uiDist = path.join(cwd, 'src/ui/dist/ui/browser'); const files = fs - .readdirSync(uiDist) + .readdirSync(uiDist, { recursive: true }) .filter(f => f.endsWith('.html') || f.endsWith('.js') || f.endsWith('.css')); for (const filename of files) { let newName = filename; const oldPath = path.join(uiDist, filename); + fs.mkdirSync(path.join('dist', path.dirname(filename)), { recursive: true }); + if (path.extname(filename) === '.html') { newName = 'ui.html'; - const newPath = path.join(cwd, 'dist', newName); + const newPath = path.join(cwd, 'dist', path.dirname(filename), newName); // Replace