No description
Find a file
Snider 4c657377c4 fix(wasm): reduce binary from 1.56MB to 830KB gzip
Move heavyweight imports out of WASM build via //go:build !js tags:
- register.go: encoding/json + text/template (codegen)
- pipeline.go: go-i18n/reversal (grammar imprint)
- layout.go: replace fmt.Sprintf with string concat

Add cmd/codegen/ CLI as build-time replacement for in-browser
registerComponents(). Reads slot JSON from stdin, writes WC bundle
JS to stdout.

Result: 2.90MB raw / 830KB gzip (was 6.04MB / 1.56MB).
Makefile gate passes (limit 1MB gzip).

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-20 08:29:54 +00:00
cmd fix(wasm): reduce binary from 1.56MB to 830KB gzip 2026-02-20 08:29:54 +00:00
codegen test: add benchmarks, Unicode edge cases, and stress tests 2026-02-20 05:33:15 +00:00
docs/plans docs: Phase 4 implementation plan — 12 tasks across 4 phases 2026-02-17 18:55:25 +00:00
.gitignore build: add Makefile with WASM build target and size check 2026-02-17 00:15:08 +00:00
bench_test.go test: add benchmarks, Unicode edge cases, and stress tests 2026-02-20 05:33:15 +00:00
CLAUDE.md fix(wasm): reduce binary from 1.56MB to 830KB gzip 2026-02-20 08:29:54 +00:00
context.go feat: add Text node with go-i18n grammar pipeline 2026-02-16 23:35:50 +00:00
edge_test.go test: add benchmarks, Unicode edge cases, and stress tests 2026-02-20 05:33:15 +00:00
FINDINGS.md docs: add CLAUDE.md, TODO.md, and FINDINGS.md for expert session 2026-02-19 17:42:08 +00:00
go.mod fix: add transitive replace for go-inference 2026-02-20 00:49:10 +00:00
go.sum feat(codegen): Web Component class generation from HLCRF slots 2026-02-17 20:49:45 +00:00
integration_test.go refactor: integration tests use Imprint pipeline 2026-02-17 00:14:04 +00:00
layout.go fix(wasm): reduce binary from 1.56MB to 830KB gzip 2026-02-20 08:29:54 +00:00
layout_test.go feat: add HLCRF Layout type with semantic elements 2026-02-16 23:39:43 +00:00
Makefile fix: escape variant names, single-pass StripTags, WASM security contract 2026-02-17 00:21:24 +00:00
node.go feat: add Attr() helper for setting element attributes 2026-02-17 00:08:17 +00:00
node_test.go fix: escape variant names, single-pass StripTags, WASM security contract 2026-02-17 00:21:24 +00:00
path.go feat: add nested layout path chains 2026-02-16 23:40:40 +00:00
path_test.go feat: add nested layout path chains 2026-02-16 23:40:40 +00:00
pipeline.go fix(wasm): reduce binary from 1.56MB to 830KB gzip 2026-02-20 08:29:54 +00:00
pipeline_test.go fix(wasm): reduce binary from 1.56MB to 830KB gzip 2026-02-20 08:29:54 +00:00
render.go feat: add render pipeline and validation tests 2026-02-16 23:43:05 +00:00
render_test.go feat: add render pipeline and validation tests 2026-02-16 23:43:05 +00:00
responsive.go fix: escape variant names, single-pass StripTags, WASM security contract 2026-02-17 00:21:24 +00:00
responsive_test.go test: verify responsive variant path isolation 2026-02-17 00:10:33 +00:00
SESSION-BRIEF.md docs: add session brief for expert agent work 2026-02-19 17:38:47 +00:00
TODO.md fix(wasm): reduce binary from 1.56MB to 830KB gzip 2026-02-20 08:29:54 +00:00