This commit is contained in:
Joseph Garrone 2020-05-14 02:05:09 +02:00
parent 2a97d59ca6
commit 9f92c32af2

View file

@ -1,10 +1,8 @@
import * as fs from "fs";
import * as path from "path";
function getProjectRootRec(dirPath: string): string {
if( fs.existSync(path.join(dirPath, "package.json")) ){
if (fs.existsSync(path.join(dirPath, "package.json"))) {
return dirPath;
}
return getProjectRootRec(path.join(dirPath, ".."))