Rush StackShopBlogEvents
Skip to main content

Home > @rushstack/rig-package > RigConfig > tryResolveConfigFilePath

RigConfig.tryResolveConfigFilePath() method

This lookup first checks for the specified relative path under projectFolderPath; if it does not exist there, then it checks in the resolved rig profile folder. If the file is found, its absolute path is returned. Otherwise, undefined is returned.

Signature:

tryResolveConfigFilePath(configFileRelativePath: string): string | undefined;

Parameters

ParameterTypeDescription
configFileRelativePathstring

Returns:

string | undefined

Remarks

For example, suppose the rig profile is:

/path/to/your-project/node_modules/example-rig/profiles/example-profile

And suppose configFileRelativePath is folder/file.json. Then the following locations will be checked:

/path/to/your-project/folder/file.json

/path/to/your-project/node_modules/example-rig/profiles/example-profile/folder/file.json