readPackageJson
Reads the package.json file from the specified folder or from the root if no folder is specified.
Import:
import { readPackageJson } from 'obsidian-dev-utils/script-utils/npm';Signature:
function readPackageJson(cwd: string | undefined): Promise<PackageJson>Parameters:
| Parameter | Type | Description |
|---|---|---|
cwd | string | undefined | The current working folder where package.json is located. |
Returns: Promise<PackageJson> — A Promise that resolves with the parsed PackageJson object.