fix(dev-infra): migrate dev-infra config loading to .ng-dev directory (#37142)

Migrate to using .ng-dev directory for ng-dev configuration to better
allow management of the configuration using multiple files.  The
intention is to prevent the config file from becoming unruly.

PR Close #37142
This commit is contained in:
Joey Perrott 2020-05-15 14:15:10 -07:00 committed by Matias Niemelä
parent d1ea1f4c7f
commit 3d154ab795
1 changed files with 2 additions and 2 deletions

View File

@ -39,7 +39,7 @@ export type NgDevConfig<T = {}> = CommonConfig&T;
* The filename expected for creating the ng-dev config, without the file * The filename expected for creating the ng-dev config, without the file
* extension to allow either a typescript or javascript file to be used. * extension to allow either a typescript or javascript file to be used.
*/ */
const CONFIG_FILE_NAME = '.ng-dev-config'; const CONFIG_FILE_PATH = '.ng-dev/config';
/** The configuration for ng-dev. */ /** The configuration for ng-dev. */
let CONFIG: {}|null = null; let CONFIG: {}|null = null;
@ -52,7 +52,7 @@ export function getConfig(): NgDevConfig {
// If the global config is not defined, load it from the file system. // If the global config is not defined, load it from the file system.
if (CONFIG === null) { if (CONFIG === null) {
// The full path to the configuration file. // The full path to the configuration file.
const configPath = join(getRepoBaseDir(), CONFIG_FILE_NAME); const configPath = join(getRepoBaseDir(), CONFIG_FILE_PATH);
// Set the global config object. // Set the global config object.
CONFIG = readConfigFile(configPath); CONFIG = readConfigFile(configPath);
} }