RoadmapShopEvents
Skip to main content

Home > @rushstack/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[], gitPath?: string): Map<string, string>;

Parameters

ParameterTypeDescription
packagePathstring(Optional) 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.
excludedPathsstring[](Optional) An optional array of file path exclusions. If a file should be omitted from the list of dependencies, use this to exclude it.
gitPathstring(Optional)

Returns:

Map<string, string>

the package-deps.json file content