mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-02-10 02:05:46 +00:00
10 lines
254 B
TypeScript
10 lines
254 B
TypeScript
|
const fs = require('fs')
|
||
|
const path = require('path')
|
||
|
|
||
|
export function getAppRootDir () {
|
||
|
let currentDir = __dirname
|
||
|
while(!fs.existsSync(path.join(currentDir, 'package.json'))) {
|
||
|
currentDir = path.join(currentDir, '..')
|
||
|
}
|
||
|
return currentDir
|
||
|
}
|