writePackageJsonSync
Writes the provided PackageJson object to the package.json file in the specified folder or in the root.
Import:
import { writePackageJsonSync } from 'obsidian-dev-utils/script-utils/npm';Signature:
function writePackageJsonSync(packageJson: PackageJson, cwd: string | undefined): voidParameters:
| Parameter | Type | Description |
|---|---|---|
packageJson | PackageJson | The PackageJson object to write. |
cwd | string | undefined | The current working folder where package.json is located. |
Returns: void