Documentation
¶
Overview ¶
Package dev implements `trilha dev`: a polling file watcher, a builder and a supervisor that runs the app behind a reverse proxy with live reload.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Change ¶
type Change struct {
Paths []string
// StaticOnly is true when only files under public/ changed and public/
// neither appeared nor disappeared: the app can reload without a rebuild.
StaticOnly bool
}
Change is one debounced batch of file changes.
type Generator ¶
type Generator func() error
Generator regenerates trilha_gen.go; injected by the CLI.
type Server ¶
type Server struct {
Root string
Addr string
Generate Generator
Out io.Writer
// contains filtered or unexported fields
}
Server is the dev supervisor: public listener + proxy + child process.
Click to show internal directories.
Click to hide internal directories.