From b20a63d103a701f01d7d0519eeb7b444fb9fde3a Mon Sep 17 00:00:00 2001 From: Adam Harvey Date: Mon, 7 Dec 2020 03:44:25 -0500 Subject: [PATCH] fix(lighthouse): Typo & example code tweaks (#3573) * Update export example * Fix typo --- plugins/lighthouse/README.md | 5 ++--- plugins/lighthouse/src/components/Intro/index.tsx | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/plugins/lighthouse/README.md b/plugins/lighthouse/README.md index cdcc2fe2c4..1f1d32937f 100644 --- a/plugins/lighthouse/README.md +++ b/plugins/lighthouse/README.md @@ -27,8 +27,7 @@ your app's [`plugins.ts`](https://github.com/backstage/backstage/blob/master/pac to enable the plugin: ```js -import { default as LighthousePlugin } from '@backstage/plugin-lighthouse'; -export LighthousePlugin; +export { plugin as LighthousePlugin } from '@backstage/plugin-lighthouse'; ``` Then, you need to use the `lighthouseApiRef` exported from the plugin to initialize the Rest API in @@ -74,7 +73,7 @@ metadata: lighthouse.com/website-url: # A single website url e.g. https://backstage.io/ ``` -> NOTE: The lighthouse plugin only supports one website url per component at this time. +> NOTE: The lighthouse plugin only supports one website URL per component at this time. Add a lighthouse tab to the EntityPage: diff --git a/plugins/lighthouse/src/components/Intro/index.tsx b/plugins/lighthouse/src/components/Intro/index.tsx index 3e969a3c74..b140141c9f 100644 --- a/plugins/lighthouse/src/components/Intro/index.tsx +++ b/plugins/lighthouse/src/components/Intro/index.tsx @@ -26,7 +26,7 @@ export const LIGHTHOUSE_INTRO_LOCAL_STORAGE = const USE_CASES = ` Google's [Lighthouse](https://developers.google.com/web/tools/lighthouse) auditing tool for websites -is a great open-source resource forbenchmarking and improving the accessibility, performance, SEO, and best practices of your site. +is a great open-source resource for benchmarking and improving the accessibility, performance, SEO, and best practices of your site. At Spotify, we keep track of Lighthouse audit scores over time to look at trends and overall areas for investment. This plugin allows you to generate on-demand Lighthouse audits for websites, and to track the trends for the @@ -46,8 +46,7 @@ your app's [\`plugins.ts\`](https://github.com/backstage/backstage/blob/master/p to enable the plugin: \`\`\`js -import { default as LighthousePlugin } from '@backstage/plugin-lighthouse'; -export LighthousePlugin; +export { plugin as LighthousePlugin } from '@backstage/plugin-lighthouse'; \`\`\` Then, you need to use the \`lighthouseApiRef\` exported from the plugin to initialize the Rest API in