writePackageLockJson
Writes the provided PackageJson object to the package-lock.json file in the specified folder or in the root.
Import:
import { writePackageLockJson } from 'obsidian-dev-utils/script-utils/npm';Signature:
function writePackageLockJson(packageLockJson: PackageLockJson, cwd: string | undefined): Promise<void>Parameters:
| Parameter | Type | Description |
|---|---|---|
packageLockJson | PackageLockJson | The PackageLockJson object to write. |
cwd | string | undefined | The current working folder where package-lock.json is located. |
Returns: Promise<void> — A Promise that resolves when the file has been written.