Precise DOM morphing
morphing typescript dom
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Output gzipped size

+11
+1
AGENTS.md
··· 5 5 - I’m using `jj` so you can use that to look at your diff, but please don’t commit unless I ask you to. 6 6 - Make sure you leave things in a good state. No diagnostics warnings. No type errors. 7 7 - We use tabs for indentation and spaces for alignment 8 + - Never say “you’re absolutely right”
+10
build.ts
··· 1 1 import { build } from "bun" 2 2 import { $ } from "bun" 3 + import { gzipSync } from "zlib" 4 + import { statSync, readFileSync } from "fs" 3 5 4 6 // Build and minify with Bun 5 7 await build({ ··· 13 15 // Generate TypeScript declarations (skip lib check to avoid node type errors) 14 16 await $`tsc --emitDeclarationOnly --declaration --outDir dist --skipLibCheck` 15 17 18 + // Calculate and display file sizes 19 + const minifiedPath = "./dist/morphlex.min.js" 20 + const minifiedSize = statSync(minifiedPath).size 21 + const minifiedContent = readFileSync(minifiedPath) 22 + const gzippedSize = gzipSync(new Uint8Array(minifiedContent)).length 23 + 16 24 console.log("Build complete") 25 + console.log(`Minified size: ${(minifiedSize / 1024).toFixed(2)} KB`) 26 + console.log(`Gzipped size: ${(gzippedSize / 1024).toFixed(2)} KB`)