Home > @rushstack/rig-package > RigConfig
RigConfig class
This is the main API for loading the config/rig.json
file format.
Signature:
export declare class RigConfig implements IRigConfig
Implements: IRigConfig
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
filePath | readonly | string | The full path to the rig.json file that was found, or "" if none was found. |
jsonSchemaObject |
| object | The JSON contents of the RigConfig.jsonSchemaPath file. |
jsonSchemaPath | static | string | Returns the absolute path of the rig.schema.json JSON schema file for config/rig.json , which is bundled with this NPM package. |
projectFolderOriginalPath | readonly | string | The project folder path that was passed to RigConfig.loadForProjectFolder(), which maybe an absolute or relative path. |
projectFolderPath | readonly | string | The absolute path for the project folder path that was passed to RigConfig.loadForProjectFolder(). |
relativeProfileFolderPath | readonly | string | The relative path to the rig profile specified by rig.json , or "" if the file was not found. |
rigFound | readonly | boolean | Returns true if config/rig.json was found, or false otherwise. |
rigPackageName | readonly | string | The "rigPackageName" field from rig.json , or "" if the file was not found. |
rigProfile | readonly | string | The "rigProfile" value that was loaded from rig.json , or "" if the file was not found. |
Methods
Method | Modifiers | Description |
---|---|---|
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 IRigConfig.getResolvedProfileFolder() | |
loadForProjectFolder(options) | static | Use this method to load the config/rig.json file for a given project. |
loadForProjectFolderAsync(options) | static | An 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 IRigConfig.tryResolveConfigFilePath() |