Skip to content

getPackageLockJsonPath

Resolves the path to the package-lock.json file in the specified folder or in the root if no folder is specified.

Import:

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

Signature:

function getPackageLockJsonPath(cwd: string | undefined): string

Parameters:

ParameterTypeDescription
cwdstring | undefinedThe current working folder where package-lock.json is located.

Returns: string — The resolved path to the package-lock.json file.