Documentation
¶
Overview ¶
Package codegen generates the code that connects a Tern app's routes to the runtime: tern.gen.go for the Go server, the client route manifest for Vite, and TypeScript types for every route.
Index ¶
Constants ¶
View Source
const ( RoutesDir = "src/routes" AppHTML = "src/app.html" GenDir = ".tern" GoFile = "tern.gen.go" ClientEntry = ".tern/generated/client.js" ClientOut = ".tern/output/client" ServerEntry = ".tern/generated/server.js" ServerOut = ".tern/output/server" )
Project layout conventions.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Result ¶
type Result struct {
Manifest *routes.Manifest
// Changed lists the files that were written because their content changed.
Changed []string
// GoChanged reports whether Go code changed, so the server must be rebuilt.
GoChanged bool
// Prerender reports whether any route is prerendered at build time.
Prerender bool
}
Result describes what Generate produced.
Click to show internal directories.
Click to hide internal directories.