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