/read-package-json

Primary LanguageTypeScriptMIT LicenseMIT

@pnpm/read-package-json

Read a package.json

npm version Build Status

Installation

npm i -S @pnpm/read-package-json

Usage

import readPackageJson from '@pnpm/read-package-json'

const pkgJson = await readPackageJson('package.json')

API

default: readPackageJson(path): Promise<PackageJson>

Arguments

  • path - String - path to the package.json

fromDir(path): Promise<PackageJson>

Arguments

  • path - String - path to the directory with the package.json

License

MIT © Zoltan Kochan