({
categories,
}: LighthouseOptions)
| 132 | } |
| 133 | |
| 134 | function createCategories({ |
| 135 | categories, |
| 136 | }: LighthouseOptions): CategoryCodegenConfig[] { |
| 137 | return CATEGORIES.filter(({ slug }) => categories.includes(slug)).map( |
| 138 | ({ slug, title, description, group }) => ({ |
| 139 | slug, |
| 140 | title, |
| 141 | description, |
| 142 | refsExpression: `lighthouseGroupRefs(${PLUGIN_VAR}, ${singleQuote(group)})`, |
| 143 | }), |
| 144 | ); |
| 145 | } |
| 146 | |
| 147 | function formatUrls([first, ...rest]: [string, ...string[]]): string { |
| 148 | if (rest.length === 0) { |