nx/docs/generated/packages/angular/migrations/set-generator-defaults-for-previous-style-guide.json
Leosvel Pérez Espinosa 752d418f78
feat(angular): support angular cli v20.0.0-rc.3 (#30715)
Add support for the Angular CLI **20.0.0-rc.3** version.
2025-05-26 10:00:47 -04:00

15 lines
4.6 KiB
JSON

{
"name": "set-generator-defaults-for-previous-style-guide",
"version": "21.2.0-beta.0",
"requires": { "@angular/core": ">=20.0.0-rc.2" },
"description": "Update the generator defaults to maintain the previous style guide behavior.",
"factory": "./src/migrations/update-21-2-0/set-generator-defaults-for-previous-style-guide",
"implementation": "/packages/angular/src/migrations/update-21-2-0/set-generator-defaults-for-previous-style-guide.ts",
"aliases": [],
"hidden": false,
"path": "/packages/angular",
"schema": null,
"type": "migration",
"examplesFile": "#### Set Generator Defaults for Previous Style Guide\n\nUpdates the generator defaults in the `nx.json` file to maintain the previous Angular Style Guide behavior. This ensures that newly generated code in existing workspaces follows the same conventions as the existing codebase.\n\n#### Examples\n\nThe migration will add default configurations for the relevant Angular generators in the workspace's `nx.json` file:\n\n{% tabs %}\n{% tab label=\"Before\" %}\n\n```json {% fileName=\"nx.json\" %}\n{\n \"generators\": {}\n}\n```\n\n{% /tab %}\n\n{% tab label=\"After\" %}\n\n```json {% fileName=\"nx.json\" %}\n{\n \"generators\": {\n \"@nx/angular:component\": {\n \"type\": \"component\"\n },\n \"@nx/angular:directive\": {\n \"type\": \"directive\"\n },\n \"@nx/angular:service\": {\n \"type\": \"service\"\n },\n \"@nx/angular:scam\": {\n \"type\": \"component\"\n },\n \"@nx/angular:scam-directive\": {\n \"type\": \"directive\"\n },\n \"@nx/angular:guard\": {\n \"typeSeparator\": \".\"\n },\n \"@nx/angular:interceptor\": {\n \"typeSeparator\": \".\"\n },\n \"@nx/angular:module\": {\n \"typeSeparator\": \".\"\n },\n \"@nx/angular:pipe\": {\n \"typeSeparator\": \".\"\n },\n \"@nx/angular:resolver\": {\n \"typeSeparator\": \".\"\n },\n \"@schematics/angular:component\": {\n \"type\": \"component\"\n },\n \"@schematics/angular:directive\": {\n \"type\": \"directive\"\n },\n \"@schematics/angular:service\": {\n \"type\": \"service\"\n },\n \"@schematics/angular:guard\": {\n \"typeSeparator\": \".\"\n },\n \"@schematics/angular:interceptor\": {\n \"typeSeparator\": \".\"\n },\n \"@schematics/angular:module\": {\n \"typeSeparator\": \".\"\n },\n \"@schematics/angular:pipe\": {\n \"typeSeparator\": \".\"\n },\n \"@schematics/angular:resolver\": {\n \"typeSeparator\": \".\"\n }\n }\n}\n```\n\n{% /tab %}\n{% /tabs %}\n\nIf some of the generator defaults are already set, the migration will not override them:\n\n{% tabs %}\n{% tab label=\"Before\" %}\n\n```json {% fileName=\"nx.json\" highlightLines=[\"3-14\"] %}\n{\n \"generators\": {\n \"@nx/angular:component\": {\n \"type\": \"cmp\"\n },\n \"@schematics/angular:component\": {\n \"type\": \"cmp\"\n },\n \"@nx/angular:interceptor\": {\n \"typeSeparator\": \"-\"\n },\n \"@schematics/angular:interceptor\": {\n \"typeSeparator\": \"-\"\n }\n }\n}\n```\n\n{% /tab %}\n\n{% tab label=\"After\" %}\n\n```json {% fileName=\"nx.json\" highlightLines=[\"3-14\"] %}\n{\n \"generators\": {\n \"@nx/angular:component\": {\n \"type\": \"cmp\"\n },\n \"@schematics/angular:component\": {\n \"type\": \"cmp\"\n },\n \"@nx/angular:interceptor\": {\n \"typeSeparator\": \"-\"\n },\n \"@schematics/angular:interceptor\": {\n \"typeSeparator\": \"-\"\n },\n \"@nx/angular:directive\": {\n \"type\": \"directive\"\n },\n \"@nx/angular:service\": {\n \"type\": \"service\"\n },\n \"@nx/angular:scam\": {\n \"type\": \"component\"\n },\n \"@nx/angular:scam-directive\": {\n \"type\": \"directive\"\n },\n \"@nx/angular:guard\": {\n \"typeSeparator\": \".\"\n },\n \"@nx/angular:module\": {\n \"typeSeparator\": \".\"\n },\n \"@nx/angular:pipe\": {\n \"typeSeparator\": \".\"\n },\n \"@nx/angular:resolver\": {\n \"typeSeparator\": \".\"\n },\n \"@schematics/angular:directive\": {\n \"type\": \"directive\"\n },\n \"@schematics/angular:service\": {\n \"type\": \"service\"\n },\n \"@schematics/angular:guard\": {\n \"typeSeparator\": \".\"\n },\n \"@schematics/angular:module\": {\n \"typeSeparator\": \".\"\n },\n \"@schematics/angular:pipe\": {\n \"typeSeparator\": \".\"\n },\n \"@schematics/angular:resolver\": {\n \"typeSeparator\": \".\"\n }\n }\n}\n```\n\n{% /tab %}\n{% /tabs %}\n"
}