getPackageJsonPath
Resolves the path to the package.json file in the specified folder or in the root if no folder is specified.
Import:
import { getPackageJsonPath } from 'obsidian-dev-utils/script-utils/npm';Signature:
function getPackageJsonPath(cwd: string | undefined): stringParameters:
| Parameter | Type | Description |
|---|---|---|
cwd | string | undefined | The current working folder where package.json is located. |
Returns: string — The resolved path to the package.json file.