Make Vite run copy-keaycloak-resources-to-public

This commit is contained in:
Joseph Garrone
2024-02-11 20:15:18 +01:00
parent 6d4a948dd8
commit ad70a4cffd
7 changed files with 108 additions and 31 deletions

View File

@ -0,0 +1,19 @@
import * as fs from "fs";
import * as path from "path";
function getThisCodebaseRootDirPath_rec(dirPath: string): string {
if (fs.existsSync(path.join(dirPath, "package.json"))) {
return dirPath;
}
return getThisCodebaseRootDirPath_rec(path.join(dirPath, ".."));
}
let result: string | undefined = undefined;
export function getThisCodebaseRootDirPath(): string {
if (result !== undefined) {
return result;
}
return (result = getThisCodebaseRootDirPath_rec(__dirname));
}