1.0.2 • Published 2 years ago
root-pkg-json v1.0.2
If I should maintain this repo, please ⭐️
DM me on Twitter if you have questions or suggestions.
Installation
npm install root-pkg-jsonyarn add root-pkg-jsonpnpm add root-pkg-jsonbun add root-pkg-jsonUsage
import { rootPkgJSON } from "root-pkg-json";
// Returns an absolute path to the root package.json
const pkgJSON = await rootPkgJSON(); // string | undefinedOptions
type Options {
/**
* The directory to start searching from.
*
* @default process.cwd()
*/
readonly cwd?: URL | string;
};- locate-path: Get the first path that exists on disk of multiple paths
- autorepo: Autorepo abstracts away your dev dependencies, providing a single command to run all of your scripts.