Home > @microsoft/package-deps-hash > getPackageDeps

getPackageDeps() function

Builds an object containing hashes for the files under the specified packagePath folder.

Signature:

export declare function getPackageDeps(packagePath?: string, excludedPaths?: string[]): IPackageDeps;

Parameters

Parameter Type Description
packagePath string The folder path to derive the package dependencies from. This is typically the folder containing package.json. If omitted, the default value is the current working directory.
excludedPaths string[] An optional array of file path exclusions. If a file should be omitted from the list of dependencies, use this to exclude it.

Returns:

IPackageDeps

the package-deps.json file content