Skip to content

@salesforce/b2c-tooling-sdk / discovery / readPackageJson

Function: readPackageJson() ​

readPackageJson(dirPath): Promise<PackageJson | undefined>

Defined in: packages/b2c-tooling-sdk/src/discovery/utils.ts:32

Reads and parses a package.json file from a directory.

Parameters ​

dirPath ​

string

Directory containing package.json

Returns ​

Promise<PackageJson | undefined>

Parsed package.json or undefined if not found/invalid

Released under the Apache-2.0 License.