tech-radar: migrated to new composability API
This commit is contained in:
@@ -14,7 +14,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export { plugin } from './plugin';
|
||||
export {
|
||||
techRadarPlugin,
|
||||
techRadarPlugin as plugin,
|
||||
TechRadarPage,
|
||||
} from './plugin';
|
||||
|
||||
export { RadarPage as Router } from './components/RadarPage';
|
||||
|
||||
|
||||
@@ -14,10 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { plugin } from './plugin';
|
||||
import { techRadarPlugin } from './plugin';
|
||||
|
||||
describe('tech-radar', () => {
|
||||
it('should export plugin', () => {
|
||||
expect(plugin).toBeDefined();
|
||||
expect(techRadarPlugin).toBeDefined();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -14,8 +14,26 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { createPlugin } from '@backstage/core';
|
||||
import {
|
||||
createPlugin,
|
||||
createRouteRef,
|
||||
createRoutableExtension,
|
||||
} from '@backstage/core';
|
||||
|
||||
export const plugin = createPlugin({
|
||||
id: 'tech-radar',
|
||||
const rootRouteRef = createRouteRef({
|
||||
title: 'Tech Radar',
|
||||
});
|
||||
|
||||
export const techRadarPlugin = createPlugin({
|
||||
id: 'tech-radar',
|
||||
routes: {
|
||||
root: rootRouteRef,
|
||||
},
|
||||
});
|
||||
|
||||
export const TechRadarPage = techRadarPlugin.provide(
|
||||
createRoutableExtension({
|
||||
component: () => import('./components/RadarPage').then(m => m.RadarPage),
|
||||
mountPoint: rootRouteRef,
|
||||
}),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user