1.0.2 • Published 10 months ago

root-pkg-json v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

If I should maintain this repo, please ⭐️

DM me on Twitter if you have questions or suggestions.


Installation

npm install root-pkg-json
yarn add root-pkg-json
pnpm add root-pkg-json
bun add root-pkg-json

Usage

import { rootPkgJSON } from "root-pkg-json";

// Returns an absolute path to the root package.json
const pkgJSON = await rootPkgJSON(); // string | undefined

Options

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.

MIT