tobogganSe connecter

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
13 lignes · 649 octetsBrut · Historique
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 */
7import { brotliCompressSync, gzipSync } from "node:zlib";
8import { buildRelease } from "./release";
9
10const entry = process.argv[2];
11if (!entry) throw new Error("usage: bun run scripts/size.ts <entrypoint>");
12const code = await buildRelease(entry);
13console.log(JSON.stringify({ entry, min: code.length, gz: gzipSync(code).byteLength, br: brotliCompressSync(code).byteLength }));