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