From 1eba1aaf153895dac6916d07629bb96d5b0c1d98 Mon Sep 17 00:00:00 2001 From: Joey Perrott Date: Mon, 4 May 2020 12:34:55 -0700 Subject: [PATCH] build: update ng-dev config file (#36918) Migrate to the new .ng-dev-config.js file for providing a configuration to ng-dev. This is being done as a result of the previous commit which updated the ng-dev command to expect this new file. PR Close #36918 --- .dev-infra.json | 72 ------------------------------------------ .ng-dev-config.js | 79 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 79 insertions(+), 72 deletions(-) delete mode 100644 .dev-infra.json create mode 100644 .ng-dev-config.js diff --git a/.dev-infra.json b/.dev-infra.json deleted file mode 100644 index bd898f7593..0000000000 --- a/.dev-infra.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "commitMessage": { - "maxLength": 120, - "minBodyLength": 100, - "types": [ - "build", - "ci", - "docs", - "feat", - "fix", - "perf", - "refactor", - "release", - "style", - "test" - ], - "scopes": [ - "animations", - "bazel", - "benchpress", - "changelog", - "common", - "compiler", - "compiler-cli", - "core", - "dev-infra", - "docs-infra", - "elements", - "forms", - "http", - "language-service", - "localize", - "ngcc", - "packaging", - "platform-browser", - "platform-browser-dynamic", - "platform-server", - "platform-webworker", - "platform-webworker-dynamic", - "router", - "service-worker", - "upgrade", - "ve", - "zone.js" - ] - }, - "format": { - "clang-format": { - "matchers": [ - "dev-infra/**/*.{js,ts}", - "packages/**/*.{js,ts}", - "!packages/zone.js", - "!packages/common/locales/**/*.{js,ts}", - "!packages/common/src/i18n/available_locales.ts", - "!packages/common/src/i18n/currencies.ts", - "!packages/common/src/i18n/locale_en.ts", - "modules/benchmarks/**/*.{js,ts}", - "modules/playground/**/*.{js,ts}", - "tools/**/*.{js,ts}", - "!tools/gulp-tasks/cldr/extract.js", - "!tools/public_api_guard/**/*.d.ts", - "!tools/ts-api-guardian/test/fixtures/**", - "./*.{js,ts}", - "!**/node_modules/**", - "!**/dist/**", - "!**/built/**", - "!shims_for_IE.js" - ] - }, - "buildifier": true - } -} diff --git a/.ng-dev-config.js b/.ng-dev-config.js new file mode 100644 index 0000000000..ae4c7c0897 --- /dev/null +++ b/.ng-dev-config.js @@ -0,0 +1,79 @@ +// The configuration for `ng-dev commit-message` commands. +const commitMessage = { + 'maxLength': 120, + 'minBodyLength': 100, + 'types': [ + 'build', + 'ci', + 'docs', + 'feat', + 'fix', + 'perf', + 'refactor', + 'release', + 'style', + 'test', + ], + 'scopes': [ + 'animations', + 'bazel', + 'benchpress', + 'changelog', + 'common', + 'compiler', + 'compiler-cli', + 'core', + 'dev-infra', + 'docs-infra', + 'elements', + 'forms', + 'http', + 'language-service', + 'localize', + 'ngcc', + 'packaging', + 'platform-browser', + 'platform-browser-dynamic', + 'platform-server', + 'platform-webworker', + 'platform-webworker-dynamic', + 'router', + 'service-worker', + 'upgrade', + 've', + 'zone.js', + ] +}; + +// The configuration for `ng-dev format` commands. +const format = { + 'clang-format': { + 'matchers': [ + 'dev-infra/**/*.{js,ts}', + 'packages/**/*.{js,ts}', + '!packages/zone.js', + '!packages/common/locales/**/*.{js,ts}', + '!packages/common/src/i18n/available_locales.ts', + '!packages/common/src/i18n/currencies.ts', + '!packages/common/src/i18n/locale_en.ts', + 'modules/benchmarks/**/*.{js,ts}', + 'modules/playground/**/*.{js,ts}', + 'tools/**/*.{js,ts}', + '!tools/gulp-tasks/cldr/extract.js', + '!tools/public_api_guard/**/*.d.ts', + '!tools/ts-api-guardian/test/fixtures/**', + '*.{js,ts}', + '!**/node_modules/**', + '!**/dist/**', + '!**/built/**', + '!shims_for_IE.js', + ] + }, + 'buildifier': true +}; + +// Export function to build ng-dev configuration object. +module.exports = { + commitMessage, + format, +};