Rush StackShopBlogEvents
Skip to main content

Home > @rushstack/heft > HeftConfiguration > tryLoadProjectConfigurationFile

HeftConfiguration.tryLoadProjectConfigurationFile() method

Attempts to load a riggable project configuration file using blocking, synchronous I/O.

Signature:

tryLoadProjectConfigurationFile<TConfigFile>(options: IProjectConfigurationFileSpecification<TConfigFile>, terminal: ITerminal): TConfigFile | undefined;

Parameters

Parameter

Type

Description

options

IProjectConfigurationFileSpecification<TConfigFile>

The options for the configuration file loader from @rushstack/heft-config-file. If invoking this function multiple times for the same file, reuse the same object.

terminal

ITerminal

The terminal to log messages during configuration file loading.

Returns:

TConfigFile | undefined

The configuration file, or undefined if it could not be loaded.