ConfigurationManager

Type: Class

How to get configurationManager?

JavaScript

import configurationManager from 'fontoxml-configuration/src/configurationManager.js'

Provides a mechanism for asynchronously providing configuration and other injectables to components that require them, without causing dependency ordering issues.

One configuration option is always defined: scope. This can be included by including const scope = configurationManager.get('scope');. The value of this configuration option is the value of the scope object in the URL.

Methods

set

Type: Function

Set a configuration value

Arguments

setDefault

Type: Function

Set the default value for a configuration value.

The default value is used if no value is specified for the same key in config/configuration.js. If a package attempts to get a configuration value without a default value set, an error will be thrown.

This should only be called in the setDefaultConfiguration.js for the package defining the configuration value.

Arguments