Skip to content

Commit

Permalink
fix(gatsby-plugin-benchmark-reporting): Update pageCount to use NUM_P…
Browse files Browse the repository at this point in the history
…AGES (#22766)

* Update pageCount to use NUM_PAGES

* parseInt for NUM_PAGES environment
  • Loading branch information
duffn authored Apr 3, 2020
1 parent c6552a2 commit b5b41a0
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,6 @@ class BenchMeta {
`find public .cache -type f -iname "*.bmp" -or -iname "*.tif" -or -iname "*.webp" -or -iname "*.svg" | wc -l`
)

const pageCount = glob(`**/**.json`, {
cwd: `./public/page-data`,
nocase: true,
}).length

const benchmarkMetadata = this.getMetadata()

return {
Expand All @@ -181,7 +176,7 @@ class BenchMeta {
webpack: webpackVersion,
},
counts: {
pages: pageCount,
pages: parseInt(process.env.NUM_PAGES),
jpgs: jpgCount,
pngs: pngCount,
gifs: gifCount,
Expand Down

0 comments on commit b5b41a0

Please sign in to comment.