diff options
| author | Adam Soltys <[email protected]> | 2026-09-02 20:09:46 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-09-02 20:09:46 -0700 |
| commit | 1053b92accee1d52050067d75f36c74a5fa4ca87 (patch) | |
| tree | f293e481eb3606af4c407dd860d9d04d83e99f2f /build.js | |
| parent | 35891af2bcf4f0d2e73fecf6558513bc1ecaeb2e (diff) | |
| download | coinosv3-1053b92accee1d52050067d75f36c74a5fa4ca87.tar.gz coinosv3-1053b92accee1d52050067d75f36c74a5fa4ca87.zip | |
The single-file wallet returns as a first-class artifact: every build now emits standalone.html (~950KB, everything inlined, boots from a bare file:// with no server), How it works grows a 'Keep a copy' card linking the download, and the tab strip's phantom double-tap dies — the pointerdown's paired click was arriving after the render had already swapped in fresh handlers, and with toggling tabs that ghost click un-did the tap it belonged to. The timestamp guard now lives on the DOM node, which survives the morph
Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MrkLsNScXe9b6BviUSdmMr
Diffstat (limited to 'build.js')
| -rw-r--r-- | build.js | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -413,6 +413,12 @@ if (import.meta.main) { if (/^(app|chunk)-[A-Za-z0-9]+\.js$/.test(f) && !keep.has(f)) await Bun.file('dist/' + f).delete(); } + // The standalone single-file wallet: everything inlined (deferred features + // included), no PWA plumbing — meant to be downloaded from /standalone.html + // and opened straight from a disk. Network features still reach out when + // online; the wallet itself needs no server. + await Bun.write('dist/standalone.html', await buildHtml({ minify: true, pwa: false })); + // Lazy-loaded QR decoder — kept out of index.html, fetched only when a // browser without BarcodeDetector opens the scanner. await Bun.write('dist/jsqr.js', await buildJsQr()); @@ -447,6 +453,8 @@ if (import.meta.main) { const kb = (Buffer.byteLength(html) / 1024).toFixed(0); const jkb = (Buffer.byteLength(rawJs) / 1024).toFixed(0); const ckb = (chunks.reduce((n, c) => n + Buffer.byteLength(c.text), 0) / 1024).toFixed(0); + const skb = ((await Bun.file('dist/standalone.html').arrayBuffer()).byteLength / 1024).toFixed(0); console.log(`✓ dist/index.html (${kb} KB) + app-${version}.js (${jkb} KB) + ${chunks.length} deferred chunk(s) (${ckb} KB) — offline use: install the PWA`); + console.log(`✓ dist/standalone.html (${skb} KB) — the single-file save-and-run wallet`); console.log(`✓ PWA: manifest.webmanifest, sw.js (cold-${version}), ${STATIC.length} icons, jsqr.js, nip46.js, ${locales.length} locales`); } |
