diff --git a/.github/workflows/monkey-ci.yml b/.github/workflows/monkey-ci.yml index b7183c5eb..d86fe4352 100644 --- a/.github/workflows/monkey-ci.yml +++ b/.github/workflows/monkey-ci.yml @@ -49,7 +49,7 @@ jobs: - 'backend/**/*.{ts,js,json,lua,css,html}' - 'backend/package.json' fe-src: - - 'frontend/**/*.{ts,scss}' + - 'frontend/**/*.{ts,scss,html}' - 'frontend/package.json' pkg-src: - 'packages/**/*' diff --git a/frontend/scripts/fontawesome.ts b/frontend/scripts/fontawesome.ts index 809a71a89..3cd376320 100644 --- a/frontend/scripts/fontawesome.ts +++ b/frontend/scripts/fontawesome.ts @@ -99,7 +99,9 @@ export function getFontawesomeConfig(debug = false): FontawesomeConfig { (it) => !(solid.includes(it) || regular.includes(it) || brands.includes(it)) ); if (leftOvers.length !== 0) { - throw new Error("unknown icons: " + leftOvers.toString()); + throw new Error( + "Fontawesome failed with unknown icons: " + leftOvers.toString() + ); } if (debug) { diff --git a/frontend/vite.config.prod.js b/frontend/vite.config.prod.js index c08de2629..94acf26ac 100644 --- a/frontend/vite.config.prod.js +++ b/frontend/vite.config.prod.js @@ -9,7 +9,13 @@ import { checker } from "vite-plugin-checker"; import { writeFileSync } from "fs"; // eslint-disable-next-line import/no-unresolved import UnpluginInjectPreload from "unplugin-inject-preload/vite"; -import { readdirSync, readFileSync, statSync } from "node:fs"; +import { + existsSync, + mkdirSync, + readdirSync, + readFileSync, + statSync, +} from "node:fs"; import { ViteMinifyPlugin } from "vite-plugin-minify"; import { sentryVitePlugin } from "@sentry/vite-plugin"; import { getFontsConig } from "./vite.config"; @@ -68,9 +74,14 @@ export default { apply: "build", closeBundle() { + const distPath = path.resolve(__dirname, "dist"); + if (!existsSync(distPath)) { + mkdirSync(distPath, { recursive: true }); + } + const version = CLIENT_VERSION; const versionJson = JSON.stringify({ version }); - const versionPath = path.resolve(__dirname, "dist/version.json"); + const versionPath = path.resolve(distPath, "version.json"); writeFileSync(versionPath, versionJson); }, },