Skip to main content

Home > @rushstack/rig-package > RigConfig

RigConfig class

This is the main API for loading the config/rig.json file format.


export declare class RigConfig 


filePathreadonlystringThe full path to the rig.json file that was found, or "" if none was found.



objectThe JSON contents of the RigConfig.jsonSchemaPath file.
jsonSchemaPathstaticstringReturns the absolute path of the rig.schema.json JSON schema file for config/rig.json, which is bundled with this NPM package.
projectFolderOriginalPathreadonlystringThe project folder path that was passed to RigConfig.loadForProjectFolder(), which maybe an absolute or relative path.
projectFolderPathreadonlystringThe absolute path for the project folder path that was passed to RigConfig.loadForProjectFolder().
relativeProfileFolderPathreadonlystringThe relative path to the rig profile specified by rig.json, or "" if the file was not found.
rigFoundreadonlybooleanReturns true if config/rig.json was found, or false otherwise.
rigPackageNamereadonlystringThe "rigPackageName" field from rig.json, or "" if the file was not found.
rigProfilereadonlystringThe "rigProfile" value that was loaded from rig.json, or "" if the file was not found.


getResolvedProfileFolder()Performs Node.js module resolution to locate the rig package folder, then returns the absolute path of the rig profile folder specified by rig.json.
getResolvedProfileFolderAsync()An async variant of RigConfig.getResolvedProfileFolder()
loadForProjectFolder(options)staticUse this method to load the config/rig.json file for a given project.
loadForProjectFolderAsync(options)staticAn async variant of RigConfig.loadForProjectFolder()
tryResolveConfigFilePath(configFileRelativePath)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.
tryResolveConfigFilePathAsync(configFileRelativePath)An async variant of RigConfig.tryResolveConfigFilePath()