Skip to content

getNpmShrinkWrapJsonPath

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

Import:

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

Signature:

function getNpmShrinkWrapJsonPath(cwd: string | undefined): string

Parameters:

ParameterTypeDescription
cwdstring | undefinedThe current working folder where npm-shrinkwrap.json is located.

Returns: string — The resolved path to the npm-shrinkwrap.json file.