mirror of
https://github.com/pnpm/pnpm.git
synced 2026-03-24 10:01:48 -04:00
@pnpm/types v4.0.0 @pnpm/read-package-json v3.0.0 @pnpm/write-importer-manifest v4.0.0 @pnpm/read-importer-manifest v2.0.0
@pnpm/read-package-json
Read a package.json
Installation
<pnpm|npm|yarn> add @pnpm/read-package-json
Usage
import readPackageJson from '@pnpm/read-package-json'
const pkgJson = await readPackageJson('package.json')
API
default: readPackageJson(path): Promise<PackageManifest>
Arguments
path- String - path to thepackage.json
fromDir(path): Promise<PackageManifest>
Arguments
path- String - path to the directory with thepackage.json
License
MIT © Zoltan Kochan