diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 4fe94183a2f..40e5259b1c6 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -26,7 +26,7 @@ "cpus": 4 }, "waitFor": "onCreateCommand", - "postCreateCommand": "npm install", + "postCreateCommand": "npm run install-all", "postAttachCommand": { "server": "npm run dev" }, diff --git a/.github/workflows/cypress.yaml b/.github/workflows/cypress.yaml index 500dbd92be0..0f588568bbc 100644 --- a/.github/workflows/cypress.yaml +++ b/.github/workflows/cypress.yaml @@ -70,7 +70,7 @@ jobs: node-version: "20" - name: Install dependencies 📦 - run: npm install + run: npm run install-all - name: Build ⚙️ run: npm run build diff --git a/Dockerfile b/Dockerfile index 5061a977585..3a96ab3c28a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,6 +13,8 @@ RUN npm install COPY . . +RUN npm run setup + RUN npm run build diff --git a/scripts/sort-locales.js b/scripts/sort-locales.js index cf365a41d09..adff586a93b 100644 --- a/scripts/sort-locales.js +++ b/scripts/sort-locales.js @@ -1,26 +1,15 @@ // eslint-disable-next-line @typescript-eslint/no-var-requires const fs = require("fs"); -// eslint-disable-next-line @typescript-eslint/no-var-requires -const path = require("path"); - -const directory = "src/Locale"; -fs.readdir(directory, (err, files) => { - if (err) throw err; +const file = "src/Locale/en.json"; - files.forEach((file) => { - if (file.endsWith(".json")) { - const filePath = path.join(directory, file); - const data = JSON.parse(fs.readFileSync(filePath, "utf8")); +const data = JSON.parse(fs.readFileSync(file, "utf8")); - const sortedData = Object.keys(data) - .sort() - .reduce((acc, key) => { - acc[key] = data[key]; - return acc; - }, {}); +const sortedData = Object.keys(data) + .sort() + .reduce((acc, key) => { + acc[key] = data[key]; + return acc; + }, {}); - fs.writeFileSync(filePath, JSON.stringify(sortedData, null, 2) + "\n"); - } - }); -}); +fs.writeFileSync(file, JSON.stringify(sortedData, null, 2) + "\n");