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
This commit is contained in:
parent
d493a83b2b
commit
0ea76edfd8
@ -1,5 +1,5 @@
|
|||||||
import {MergeConfig} from './dev-infra/pr/merge/config';
|
import {MergeConfig} from '../dev-infra/pr/merge/config';
|
||||||
import {determineMergeBranches} from './dev-infra/pr/merge/determine-merge-branches';
|
import {determineMergeBranches} from '../dev-infra/pr/merge/determine-merge-branches';
|
||||||
|
|
||||||
// The configuration for `ng-dev commit-message` commands.
|
// The configuration for `ng-dev commit-message` commands.
|
||||||
const commitMessage = {
|
const commitMessage = {
|
@ -953,6 +953,7 @@ groups:
|
|||||||
'.circleci/**',
|
'.circleci/**',
|
||||||
'.devcontainer/**',
|
'.devcontainer/**',
|
||||||
'.github/**',
|
'.github/**',
|
||||||
|
'.ng-dev/**',
|
||||||
'.vscode/**',
|
'.vscode/**',
|
||||||
'.yarn/**',
|
'.yarn/**',
|
||||||
'dev-infra/**',
|
'dev-infra/**',
|
||||||
|
@ -37,7 +37,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;
|
||||||
@ -50,7 +50,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);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user