cli: Rename frontend plugin templates and add auto-detection

Renamed the CLI templates for frontend plugins:
- new-frontend-plugin → frontend-plugin
- new-frontend-plugin-module → frontend-plugin-module
- frontend-plugin (legacy) → legacy-frontend-plugin

Added auto-detection logic that checks packages/app/package.json to
determine which frontend system the app uses. When using default
templates, only the appropriate frontend plugin template is shown:
- Apps with @backstage/frontend-defaults see the new system templates
- Apps with @backstage/app-defaults see the legacy template

Both templates display as "frontend-plugin" to users, so existing
workflows are preserved while automatically using the correct template.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2026-02-05 13:55:06 +01:00
parent a6735c33b1
commit 08d9770715
42 changed files with 168 additions and 99 deletions
+3
View File
@@ -83,6 +83,8 @@ When defining the `templates` array it will override the default set of template
"new": {
"templates": [
"@backstage/cli-module-new/templates/frontend-plugin",
"@backstage/cli-module-new/templates/frontend-plugin-module",
"@backstage/cli-module-new/templates/legacy-frontend-plugin",
"@backstage/cli-module-new/templates/backend-plugin",
"@backstage/cli-module-new/templates/backend-plugin-module",
"@backstage/cli-module-new/templates/plugin-web-library",
@@ -90,6 +92,7 @@ When defining the `templates` array it will override the default set of template
"@backstage/cli-module-new/templates/plugin-common-library",
"@backstage/cli-module-new/templates/web-library",
"@backstage/cli-module-new/templates/node-library",
"@backstage/cli-module-new/templates/cli-module",
"@backstage/cli-module-new/templates/catalog-provider-module",
"@backstage/cli-module-new/templates/scaffolder-backend-module"
]