Skip to content

Commit 47f9c9e

Browse files
Merge pull request #20 from jtadmor/gzip-diff-option
Add option for always showing gzip diff
2 parents c72e37f + d0374a3 commit 47f9c9e

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ For example, if you build to `dist`, you should:
4343

4444
(Optional, defaults to `0`) The threshold under which pages will be considered unchanged. For example, if `minimumChangeThreshold` was set to `500` and a page's size increased by `300 B`, it will be considered unchanged.
4545

46+
### `alwaysShowGzipDiff (boolean)`
47+
48+
(Optional, defaults to `false`) If set, the display table will show the gzip size difference for routes even when a budget is set.
49+
4650
### `skipCommentIfEmpty (boolean)`
4751

4852
(Optional, defaults to `false`) When set to `true`, if no pages have changed size the generated comment will be an empty string.

compare.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ function renderSize(d, showBudgetDiff) {
288288
const gzd = d.gzipDiff
289289
const percentChange = (gzd / d.gzip) * 100
290290
return ` | \`${filesize(d.gzip)}\`${
291-
gzd && !showBudgetDiff
291+
gzd && (options.alwaysShowGzipDiff || !showBudgetDiff)
292292
? ` _(${renderStatusIndicator(percentChange)}${filesize(gzd)})_`
293293
: ''
294294
}`

0 commit comments

Comments
 (0)