diff --git a/packages/cli/src/modules/new/lib/defaultTemplates.ts b/packages/cli/src/modules/new/lib/defaultTemplates.ts index 2a4ff9e963..1a2f7a89d4 100644 --- a/packages/cli/src/modules/new/lib/defaultTemplates.ts +++ b/packages/cli/src/modules/new/lib/defaultTemplates.ts @@ -16,7 +16,6 @@ export const defaultTemplates = [ '@backstage/cli/templates/frontend-plugin', - '@backstage/cli/templates/frontend-plugin-module', '@backstage/cli/templates/backend-plugin', '@backstage/cli/templates/backend-plugin-module', '@backstage/cli/templates/plugin-web-library', diff --git a/packages/cli/templates/frontend-plugin-module/src/index.ts.hbs b/packages/cli/templates/frontend-plugin-module/src/index.ts.hbs deleted file mode 100644 index 63ead4f9c9..0000000000 --- a/packages/cli/templates/frontend-plugin-module/src/index.ts.hbs +++ /dev/null @@ -1 +0,0 @@ -export { {{ moduleVar }} } from './plugin'; diff --git a/packages/cli/templates/frontend-plugin-module/.eslintrc.js.hbs b/packages/cli/templates/new-frontend-plugin-module/.eslintrc.js.hbs similarity index 100% rename from packages/cli/templates/frontend-plugin-module/.eslintrc.js.hbs rename to packages/cli/templates/new-frontend-plugin-module/.eslintrc.js.hbs diff --git a/packages/cli/templates/frontend-plugin-module/README.md.hbs b/packages/cli/templates/new-frontend-plugin-module/README.md.hbs similarity index 100% rename from packages/cli/templates/frontend-plugin-module/README.md.hbs rename to packages/cli/templates/new-frontend-plugin-module/README.md.hbs diff --git a/packages/cli/templates/frontend-plugin-module/package.json.hbs b/packages/cli/templates/new-frontend-plugin-module/package.json.hbs similarity index 93% rename from packages/cli/templates/frontend-plugin-module/package.json.hbs rename to packages/cli/templates/new-frontend-plugin-module/package.json.hbs index 2a12cb3559..d0511d96c0 100644 --- a/packages/cli/templates/frontend-plugin-module/package.json.hbs +++ b/packages/cli/templates/new-frontend-plugin-module/package.json.hbs @@ -10,7 +10,8 @@ "types": "dist/index.d.ts" }, "backstage": { - "role": "frontend-plugin-module" + "role": "frontend-plugin-module", + "pluginId": "{{pluginId}}" }, "sideEffects": false, "scripts": { diff --git a/packages/cli/templates/frontend-plugin-module/portable-template.yaml b/packages/cli/templates/new-frontend-plugin-module/portable-template.yaml similarity index 100% rename from packages/cli/templates/frontend-plugin-module/portable-template.yaml rename to packages/cli/templates/new-frontend-plugin-module/portable-template.yaml diff --git a/packages/cli/templates/new-frontend-plugin-module/src/index.ts.hbs b/packages/cli/templates/new-frontend-plugin-module/src/index.ts.hbs new file mode 100644 index 0000000000..aec3cb2b06 --- /dev/null +++ b/packages/cli/templates/new-frontend-plugin-module/src/index.ts.hbs @@ -0,0 +1 @@ +export { {{ moduleVar }} as default } from './plugin'; diff --git a/packages/cli/templates/frontend-plugin-module/src/plugin.ts.hbs b/packages/cli/templates/new-frontend-plugin-module/src/module.tsx.hbs similarity index 100% rename from packages/cli/templates/frontend-plugin-module/src/plugin.ts.hbs rename to packages/cli/templates/new-frontend-plugin-module/src/module.tsx.hbs diff --git a/packages/cli/templates/frontend-plugin-module/src/setupTests.ts b/packages/cli/templates/new-frontend-plugin-module/src/setupTests.ts similarity index 100% rename from packages/cli/templates/frontend-plugin-module/src/setupTests.ts rename to packages/cli/templates/new-frontend-plugin-module/src/setupTests.ts diff --git a/packages/create-app/templates/next-app/package.json.hbs b/packages/create-app/templates/next-app/package.json.hbs index 8399c6505a..2a476f6dea 100644 --- a/packages/create-app/templates/next-app/package.json.hbs +++ b/packages/create-app/templates/next-app/package.json.hbs @@ -22,6 +22,27 @@ "prettier:check": "prettier --check .", "new": "backstage-cli new" }, + "backstage": { + "cli": { + "new": { + "globals": { + "license": "UNLICENSED" + }, + "templates": [ + "@backstage/cli/templates/frontend-plugin", + "@backstage/cli/templates/new-frontend-plugin-module", + "@backstage/cli/templates/backend-plugin", + "@backstage/cli/templates/backend-plugin-module", + "@backstage/cli/templates/plugin-web-library", + "@backstage/cli/templates/plugin-node-library", + "@backstage/cli/templates/plugin-common-library", + "@backstage/cli/templates/web-library", + "@backstage/cli/templates/node-library", + "@backstage/cli/templates/scaffolder-backend-module", + ] + } + } + }, "workspaces": { "packages": [ "packages/*",