mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-03-18 15:55:10 +00:00
11 lines
270 B
TypeScript
11 lines
270 B
TypeScript
const fs = require("node:fs");
|
|
const path = require("node:path");
|
|
|
|
export function getAppRootDir() {
|
|
let currentDir = __dirname;
|
|
while (!fs.existsSync(path.join(currentDir, "package.json"))) {
|
|
currentDir = path.join(currentDir, "..");
|
|
}
|
|
return currentDir;
|
|
}
|