summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/size.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/scripts/size.js b/scripts/size.js
new file mode 100644
index 0000000..7583e86
--- /dev/null
+++ b/scripts/size.js
@@ -0,0 +1,15 @@
+import { gzipSync } from "bun";
+
+const files = [
+ "dist/cepis-autofill.js",
+ "dist/cepis-autofill.min.js",
+ "dist/cepis-autofill.esm.js",
+];
+
+for (const path of files) {
+ const bytes = await Bun.file(path).bytes();
+ const gzipped = gzipSync(bytes).length;
+ console.log(
+ `${path.padEnd(28)} ${String(bytes.length).padStart(6)} B ${String(gzipped).padStart(5)} B gzipped`,
+ );
+}