f
findProjectRoot(cwd?: string): Task<string, ProjectRootNotFoundFailure>
Walks up from the working directory to the nearest package.json and resolves to its directory.
T
ProjectRootNotFoundFailure = Failure.Of<ProjectRootNotFound>
The one failure findProjectRoot declares.
v
ProjectRootNotFound: Failure.FailureFactory<"ProjectRootNotFound", { cwd: string; }>
No package.json at or above the working directory, so there is no project to run in.
Usage
import * as mod from "lib/utils/find-project-root.ts";