From 0ea76edfd86eadfc6aea5e64cc93eeabe49e18a0 Mon Sep 17 00:00:00 2001 From: Joey Perrott Date: Thu, 28 May 2020 13:32:08 -0700 Subject: [PATCH] build: migrate ng-dev config to .ng-dev directory (#37299) Migrate to using .ng-dev directory for ng-dev configuration to allow better management of the configuration using multiple files. The intention is to prevent the config file from becoming unruly. PR Close #37299 --- .ng-dev-config.ts => .ng-dev/config.ts | 4 ++-- .pullapprove.yml | 1 + dev-infra/utils/config.ts | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) rename .ng-dev-config.ts => .ng-dev/config.ts (95%) diff --git a/.ng-dev-config.ts b/.ng-dev/config.ts similarity index 95% rename from .ng-dev-config.ts rename to .ng-dev/config.ts index aaa669ea6a..141944d22e 100644 --- a/.ng-dev-config.ts +++ b/.ng-dev/config.ts @@ -1,5 +1,5 @@ -import {MergeConfig} from './dev-infra/pr/merge/config'; -import {determineMergeBranches} from './dev-infra/pr/merge/determine-merge-branches'; +import {MergeConfig} from '../dev-infra/pr/merge/config'; +import {determineMergeBranches} from '../dev-infra/pr/merge/determine-merge-branches'; // The configuration for `ng-dev commit-message` commands. const commitMessage = { diff --git a/.pullapprove.yml b/.pullapprove.yml index b889e340d4..28f315de51 100644 --- a/.pullapprove.yml +++ b/.pullapprove.yml @@ -953,6 +953,7 @@ groups: '.circleci/**', '.devcontainer/**', '.github/**', + '.ng-dev/**', '.vscode/**', '.yarn/**', 'dev-infra/**', diff --git a/dev-infra/utils/config.ts b/dev-infra/utils/config.ts index 0a2b50a4c1..737f0b9f15 100644 --- a/dev-infra/utils/config.ts +++ b/dev-infra/utils/config.ts @@ -37,7 +37,7 @@ export type NgDevConfig = CommonConfig&T; * The filename expected for creating the ng-dev config, without the file * 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. */ let CONFIG: {}|null = null; @@ -50,7 +50,7 @@ export function getConfig(): NgDevConfig { // If the global config is not defined, load it from the file system. if (CONFIG === null) { // 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. CONFIG = readConfigFile(configPath); }