Rush StackShopBlogEvents
Skip to main content

Home > @microsoft/rush-lib > RepoStateFile > loadFromFile

RepoStateFile.loadFromFile() method

Loads the repo-state.json data from the specified file path. If the file has not been created yet, then an empty object is returned.

Signature:

static loadFromFile(jsonFilename: string, variant: string | undefined): RepoStateFile;

Parameters

ParameterTypeDescription
jsonFilenamestringThe path to the repo-state.json file.
variantstring | undefinedThe variant currently being used by Rush.

Returns:

RepoStateFile