Skip to content

Commit

Permalink
feat: externalize gatherer artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
hrenaud committed Nov 14, 2023
1 parent 6caace2 commit 4453f3b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
9 changes: 2 additions & 7 deletions lighthouse-plugin-ecoindex/bin.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import * as constants from 'lighthouse/core/config/constants.js'

import fs, { writeFileSync } from 'fs'

import CustomArtifacts from './gatherers/index.js'
import { hideBin } from 'yargs/helpers'
import path from 'path'
import puppeteer from 'puppeteer'
Expand Down Expand Up @@ -98,13 +99,7 @@ function getConfig(
disableStorageReset: isWarm,
},
plugins: ['lighthouse-plugin-ecoindex'],
artifacts: [
{
id: 'NodesMinusSvgsGatherer',
gatherer:
'lighthouse-plugin-ecoindex/gatherers/nodes-minus-svg-gatherer',
},
],
artifacts: CustomArtifacts,
},
}
}
Expand Down
10 changes: 10 additions & 0 deletions lighthouse-plugin-ecoindex/gatherers/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export default [
{
id: 'NodesMinusSvgsGatherer',
gatherer: 'lighthouse-plugin-ecoindex/gatherers/nodes-minus-svg-gatherer',
},
{
id: 'PrintCssGatherer',
gatherer: 'lighthouse-plugin-ecoindex/gatherers/bp/print-css-gatherer',
},
]

0 comments on commit 4453f3b

Please sign in to comment.