docs: update plugin installation docs

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2021-04-15 20:12:33 +02:00
parent 610619dba0
commit c614ede9a5
25 changed files with 152 additions and 283 deletions
@@ -49,19 +49,12 @@ When you have an instance running that Backstage can hook into, first install th
$ yarn add @backstage/plugin-lighthouse
\`\`\`
Then make sure to export the plugin in your app's [\`plugins.ts\`](https://github.com/backstage/backstage/blob/master/packages/app/src/plugins.ts) to enable the plugin:
Modify your app routes in \`App.tsx\` to include the \`LighthousePage\` component exported from the plugin, for example:
\`\`\`js
export { plugin as LighthousePlugin } from '@backstage/plugin-lighthouse';
\`\`\`
Modify your app routes in \`App.tsx\` or \`App.jsx\` to include the Router component exported from the plugin, for example:
\`\`\`js
\`\`\`tsx
// At the top imports
import { LighthousePage } from '@backstage/plugin-lighthouse';
// Inside App component
<FlatRoutes>
// ...
<Route path="/lighthouse" element={<LighthousePage />} />