Merge pull request #7296 from backstage/freben/core
remove some occurrences of the old core in docs etc
This commit is contained in:
@@ -188,9 +188,9 @@ Assuming you follow the common plugin structure, the changes to your front-end m
|
||||
|
||||
```diff
|
||||
// plugins/internal-plugin/src/api.ts
|
||||
- import {createApiRef} from '@backstage/core';
|
||||
+ import {createApiRef, IdentityApi} from '@backstage/core';
|
||||
import {Config} from '@backstage/config';
|
||||
- import { createApiRef } from '@backstage/core-plugin-api';
|
||||
+ import { createApiRef, IdentityApi } from '@backstage/core-plugin-api';
|
||||
import { Config } from '@backstage/config';
|
||||
// ...
|
||||
|
||||
type MyApiOptions = {
|
||||
@@ -237,14 +237,14 @@ import {
|
||||
createApiFactory,
|
||||
createPlugin,
|
||||
+ identityApiRef,
|
||||
} from '@backstage/core';
|
||||
import {mypluginPageRouteRef} from './routeRefs';
|
||||
import {MyApi, myApiRef} from './api';
|
||||
} from '@backstage/core-plugin-api';
|
||||
import { myPluginPageRouteRef } from './routeRefs';
|
||||
import { MyApi, myApiRef } from './api';
|
||||
|
||||
export const plugin = createPlugin({
|
||||
id: 'my-plugin',
|
||||
routes: {
|
||||
mainPage: mypluginPageRouteRef,
|
||||
mainPage: myPluginPageRouteRef,
|
||||
},
|
||||
apis: [
|
||||
createApiFactory({
|
||||
@@ -253,9 +253,9 @@ export const plugin = createPlugin({
|
||||
configApi: configApiRef,
|
||||
+ identityApi: identityApiRef,
|
||||
},
|
||||
- factory: ({configApi}) =>
|
||||
- factory: ({ configApi }) =>
|
||||
- new MyApi({ configApi }),
|
||||
+ factory: ({configApi, identityApi}) =>
|
||||
+ factory: ({ configApi, identityApi }) =>
|
||||
+ new MyApi({ configApi, identityApi }),
|
||||
}),
|
||||
],
|
||||
|
||||
@@ -40,7 +40,7 @@ export class CostInsightsClient implements CostInsightsApi { ... }
|
||||
|
||||
```ts
|
||||
// packages/app/src/api.ts
|
||||
import { createApiFactory } from '@backstage/core';
|
||||
import { createApiFactory } from '@backstage/core-plugin-api';
|
||||
import { costInsightsApiRef } from '@backstage/plugin-cost-insights';
|
||||
import { CostInsightsClient } from './path/to/file';
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ You can add it by overriding the `sentryApiRef`:
|
||||
```ts
|
||||
// packages/app/src/apis.ts
|
||||
|
||||
import { createApiFactory } from '@backstage/core';
|
||||
import { createApiFactory } from '@backstage/core-plugin-api';
|
||||
import { MockSentryApi, sentryApiRef } from '@backstage/plugin-sentry';
|
||||
|
||||
export const apis = [
|
||||
|
||||
@@ -24,7 +24,11 @@ If you don't have a `plugins.ts` file see: [troubleshooting](#troubleshooting)
|
||||
### Add the `<Shortcuts />` component within your `<Sidebar>`:
|
||||
|
||||
```tsx
|
||||
import { Sidebar, SidebarDivider, SidebarSpace } from '@backstage/core';
|
||||
import {
|
||||
Sidebar,
|
||||
SidebarDivider,
|
||||
SidebarSpace,
|
||||
} from '@backstage/core-components';
|
||||
import { Shortcuts } from '@backstage/plugin-shortcuts';
|
||||
|
||||
export const SidebarComponent = () => (
|
||||
|
||||
Reference in New Issue
Block a user