function findProjectRoot
findProjectRoot(): Promise<string>

Walks up parent directories from cwd to find the nearest package.json and returns its directory path.

Return Type

Promise<string>

Usage

import findProjectRoot from "lib/utils/find-project-root.ts";