Skip to content

Commit

Permalink
size script
Browse files Browse the repository at this point in the history
  • Loading branch information
laurentpayot committed Apr 11, 2023
1 parent 06bf695 commit 62650ea
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@
"scripts": {
"build-js": "terser minidenticons.js --compress module=true --mangle module=true --source-map --output minidenticons.min.js",
"no-custom-element": "cat minidenticons.min.js | sed 's/export const identiconSvg=.*$//' > no-custom-element.min.js",
"size": "echo \"\n\n\nMinified gzip size:\t`gzip -9cn minidenticons.min.js | wc -c` bytes\nMinified brotli size:\t`brotli -Zcn minidenticons.min.js | wc -c` bytes\n\"",
"size-nce": "echo \"\nWithout custom element:\n\nMinified gzip size:\t`gzip -9cn no-custom-element.min.js | wc -c` bytes\nMinified brotli size:\t`brotli -Zcn no-custom-element.min.js | wc -c` bytes\n\"",
"build": "pnpm build-js && printf '_%.0s' {1..40} && pnpm no-custom-element && pnpm --silent size && pnpm --silent size-nce",
"size": "printf '_%.0s' {1..40} && echo \"\n\nWithout custom element:\" && pnpm --silent size-no-ce && echo \"With custom element:\" && pnpm -silent size-ce && echo",
"size-no-ce": "echo \"Minified brotli size:\t`brotli -Zcn no-custom-element.min.js | wc -c` bytes\nMinified gzip size:\t`gzip -9cn no-custom-element.min.js | wc -c` bytes\n\"",
"size-ce": "echo \"Minified brotli size:\t`brotli -Zcn minidenticons.min.js | wc -c` bytes\nMinified gzip size:\t`gzip -9cn minidenticons.min.js | wc -c` bytes\"",
"build": "pnpm build-js && pnpm no-custom-element && pnpm --silent size",
"test": "node tests",
"benchmark": "node benchmark/node",
"prepublish": "pnpm build && pnpm test && git push && git push --tags",
Expand Down

0 comments on commit 62650ea

Please sign in to comment.