Help us shape the future of Go! Take the 2026 Go Developer Survey

themedev

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 19, 2026 License: MIT Imports: 19 Imported by: 0

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

View Source
const DefaultPort = 8990

DefaultPort is the port of the dev proxy without --port.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, o Options) error

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL