library
Prebuilt pebble components: drop-in custom elements, no compiler needed
Clone avec HTTPS, un jeton personnel en mot de passe, ou avec SSH, une clé ajoutée dans vos paramètres.
Dernier runAucun
0Étoiles
0Forks
2Issues
| 1 | /** |
| 2 | * Prints the release size of one entrypoint as JSON. |
| 3 | * Run in its own process: inside `bun test`, Bun.build reuses the test |
| 4 | * runtime's module resolution (CommonJS `main` entries), which inflates results. |
| 5 | * bun run scripts/size.ts packages/toaster/index.ts |
| 6 | */ |
| 7 | import { brotliCompressSync, gzipSync } from "node:zlib"; |
| 8 | import { buildRelease } from "./release"; |
| 9 | |
| 10 | const entry = process.argv[2]; |
| 11 | if (!entry) throw new Error("usage: bun run scripts/size.ts <entrypoint>"); |
| 12 | const code = await buildRelease(entry); |
| 13 | console.log(JSON.stringify({ entry, min: code.length, gz: gzipSync(code).byteLength, br: brotliCompressSync(code).byteLength })); |