Documentation
¶
Overview ¶
Package themedev runs umono theme dev: .dev/server with the theme in development, behind the dev proxy, following the changes of the theme project.
Index ¶
Constants ¶
const DefaultPort = 8990
DefaultPort is the port of the dev proxy without --port.
Variables ¶
This section is empty.
Functions ¶
func Run ¶
Run runs umono theme dev in o.ProjectDir until ctx is done. First it gets the contract of theme.toml, and stops without it. Then .dev/server is set up with the latest release when it is missing, or updated with UpdateServer, its Theme API range is compared with the CLI's, the dev directory is brought up to date and the server starts behind the dev proxy. Every change of the project brings the dev directory up to date again and tells the pages to reload, to swap the stylesheet or to show the errors. A new contract restarts .dev/server, which reads it only at startup.
Types ¶
type Options ¶
type Options struct {
// ProjectDir is the theme project.
ProjectDir string
// Port is the dev proxy's.
Port int
// UpdateServer runs the upgrade flow on .dev/server first.
UpdateServer bool
// Client gets the releases of Umono.
Client *download.Client
// Registry is where the contracts are fetched from.
Registry themeproject.Registry
// Out gets the messages of dev.
Out io.Writer
// Interval is how often the theme project is scanned for changes.
Interval time.Duration
}
Options of Run.