cli: make create-plugin add extension to app if possible
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import React from 'react';
|
||||
import { createDevApp } from '@backstage/dev-utils';
|
||||
import { {{ pluginVar }}, ExamplePage } from '../src/plugin';
|
||||
import { {{ pluginVar }}, {{ extensionName }} } from '../src/plugin';
|
||||
|
||||
createDevApp()
|
||||
.registerPlugin({{ pluginVar }})
|
||||
.addPage({
|
||||
element: <ExamplePage />,
|
||||
element: <{{ extensionName }} />,
|
||||
title: 'Root Page',
|
||||
})
|
||||
.render();
|
||||
|
||||
@@ -1 +1 @@
|
||||
export { {{ pluginVar }} } from './plugin';
|
||||
export { {{ pluginVar }}, {{ extensionName }} } from './plugin';
|
||||
|
||||
@@ -9,7 +9,7 @@ export const {{ pluginVar }} = createPlugin({
|
||||
},
|
||||
});
|
||||
|
||||
export const ExamplePage = {{ pluginVar }}.provide(
|
||||
export const {{ extensionName }} = {{ pluginVar }}.provide(
|
||||
createRoutableExtension({
|
||||
component: () =>
|
||||
import('./components/ExampleComponent').then(m => m.ExampleComponent),
|
||||
|
||||
Reference in New Issue
Block a user