add bundler stuff
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user