Skip to content

Commit

Permalink
feat(ng-dev): allow for setting the cached configuration object imper…
Browse files Browse the repository at this point in the history
…atively (#180)

PR Close #180
  • Loading branch information
josephperrott committed Aug 27, 2021
1 parent 2589dcd commit c76f891
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ng-dev/utils/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@ const USER_CONFIG_FILE_PATH = '.ng-dev.user';
/** The local user configuration for ng-dev. */
let userConfig: {[key: string]: any} | null = null;

/**
* Set the cached configuration object to be loaded later. Only to be used on CI situations in
* which loading from the `.ng-dev/` directory is not possible.
*/
export function setConfig(config: {}) {
cachedConfig = config;
}

/**
* Get the configuration from the file system, returning the already loaded
* copy if it is defined.
Expand Down

0 comments on commit c76f891

Please sign in to comment.