(dev script) Use tsconfig.json to tell we are at the root of the project
This commit is contained in:
parent
e214280fcd
commit
3476b5acc3
@ -2,7 +2,7 @@ import * as fs from "fs";
|
||||
import * as path from "path";
|
||||
|
||||
function getProjectRootRec(dirPath: string): string {
|
||||
if (fs.existsSync(path.join(dirPath, "package.json"))) {
|
||||
if (fs.existsSync(path.join(dirPath, "tsconfig.json"))) {
|
||||
return dirPath;
|
||||
}
|
||||
return getProjectRootRec(path.join(dirPath, ".."));
|
||||
|
Loading…
x
Reference in New Issue
Block a user