add bundler stuff

This commit is contained in:
2026-07-08 16:59:00 -04:00
parent 2a5fbffaa2
commit ba3d87c27f
12 changed files with 425 additions and 70 deletions

View File

@@ -4,6 +4,7 @@ package main
// Solid JSX compiler (see bundler.Build), so this wrapper carries no build logic.
import (
"flag"
"fmt"
"os"
@@ -11,8 +12,22 @@ import (
)
func main() {
if err := bundler.Build(); err != nil {
app := flag.String("app", "frontend", "App frontend source root (relative to cwd).")
web := flag.String("web", "kjol/web", "Path to the kjol web tree (kit, runtime, icons, styles).")
out := flag.String("out", "wwwroot", "Build output directory.")
genGo := flag.String("gen-go", "internal/handlers", "Directory for generated Go files.")
genTS := flag.String("gen-ts", "", "Directory for the generated TS icon registry (default <app>/src/ui/generated).")
flag.Parse()
cfg := bundler.Config{
AppFrontend: *app,
WebDir: *web,
Output: *out,
GenGoDir: *genGo,
GenTSDir: *genTS,
}
if err := bundler.Build(cfg); err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
}
}