Type: Class

How to get configurationManager?


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.



Type: Function

Get a configuration value

Use an import such as configurationManager.get('some-configuration-value') to obtain the value passed to ConfigurationManager#set for the same name.

Be careful not to create a cyclic dependency by requesting configuration values in (indirect) dependencies of configuration.js. The easiest way to prevent these dependencies is by not depending on any managers or platform code in the configuration.js files. While depending on some managers may work at this moment in time, they may start to depend on configuration in the future.


Type: Function

Set a configuration value



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.