Skip to content

writePackageLockJsonSync

Writes the provided PackageLockJson object to the package-lock.json file in the specified folder or in the root.

Import:

import { writePackageLockJsonSync } from 'obsidian-dev-utils/script-utils/npm';

Signature:

function writePackageLockJsonSync(packageLockJson: PackageLockJson, cwd: string | undefined): void

Parameters:

ParameterTypeDescription
packageLockJsonPackageLockJsonThe PackageLockJson object to write.
cwdstring | undefinedThe current working folder where package-lock.json is located.

Returns: void