From 9f9d279bd160d90910616d74bedcf7ae88cfc5bc Mon Sep 17 00:00:00 2001 From: Andre Wanlin <67169551+awanlin@users.noreply.github.com> Date: Fri, 30 Dec 2022 15:01:50 -0600 Subject: [PATCH] Updated README.md example Signed-off-by: Andre Wanlin <67169551+awanlin@users.noreply.github.com> --- .changeset/late-forks-rescue.md | 6 ++++++ plugins/explore-backend/README.md | 10 +++++----- plugins/explore/README.md | 1 + 3 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 .changeset/late-forks-rescue.md diff --git a/.changeset/late-forks-rescue.md b/.changeset/late-forks-rescue.md new file mode 100644 index 0000000000..294412a711 --- /dev/null +++ b/.changeset/late-forks-rescue.md @@ -0,0 +1,6 @@ +--- +'@backstage/plugin-explore-backend': patch +'@backstage/plugin-explore': patch +--- + +Updated `README.md` examples diff --git a/plugins/explore-backend/README.md b/plugins/explore-backend/README.md index d1714806f4..3edf48249a 100644 --- a/plugins/explore-backend/README.md +++ b/plugins/explore-backend/README.md @@ -11,32 +11,32 @@ for these tools. ```bash # From your Backstage root directory -yarn add --cwd packages/backend @backstage/plugin-explore-backend +yarn add --cwd packages/backend @backstage/plugin-explore-backend @backstage/plugin-explore-common ``` ### Adding the plugin to your `packages/backend` You'll need to add the plugin to the router in your `backend` package. You can -do this by creating a file called `packages/backend/src/plugins/explore.ts` +do this by creating a file called `packages/backend/src/plugins/explore.ts` with the following content: ```ts import { createRouter, StaticExploreToolProvider, } from '@backstage/plugin-explore-backend'; +import { ExploreTool } from '@backstage/plugin-explore-common'; import { Router } from 'express'; import { PluginEnvironment } from '../types'; // List of tools you want to surface in the Explore plugin "Tools" page. -const tools: ExploreTool[] = [ +const exploreTools: ExploreTool[] = [ { title: 'New Relic', - description:'new relic plugin', + description: 'new relic plugin', url: '/newrelic', image: 'https://i.imgur.com/L37ikrX.jpg', tags: ['newrelic', 'proxy', 'nerdGraph'], }, - ... ]; export default async function createPlugin( diff --git a/plugins/explore/README.md b/plugins/explore/README.md index 0204f34714..2388d97ac1 100644 --- a/plugins/explore/README.md +++ b/plugins/explore/README.md @@ -68,6 +68,7 @@ ready to make modifications, add the following code snippet to add the ```diff +import { ToolSearchResultListItem } from '@backstage/plugin-explore'; ++import BuildIcon from '@material-ui/icons/Build'; const SearchPage = () => { ...