runtime

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Config     Config
	Webview    webview.Webview
	ProjectDir string
	DevMode    bool
	DevURL     string // set by dev server to load URL instead of file
}

App is the main LightShell application.

func (*App) Run

func (a *App) Run() error

Run starts the LightShell application.

type BuildConfig

type BuildConfig struct {
	Icon  string `json:"icon"`
	AppID string `json:"appId"`
}

type Config

type Config struct {
	Name         string       `json:"name"`
	Version      string       `json:"version"`
	Entry        string       `json:"entry"`
	Window       WindowConfig `json:"window"`
	Tray         bool         `json:"tray"`
	Build        BuildConfig  `json:"build"`
	Permissions  []string     `json:"permissions"`
	DevCommand   string       `json:"devCommand,omitempty"`
	BuildCommand string       `json:"buildCommand,omitempty"`
}

Config represents the lightshell.json configuration.

func LoadConfig

func LoadConfig(dir string) (Config, error)

LoadConfig reads and parses lightshell.json from the given directory.

type WindowConfig

type WindowConfig struct {
	Title     string `json:"title"`
	Width     int    `json:"width"`
	Height    int    `json:"height"`
	MinWidth  int    `json:"minWidth"`
	MinHeight int    `json:"minHeight"`
	Resizable *bool  `json:"resizable"`
	Frameless bool   `json:"frameless"`
}

Jump to

Keyboard shortcuts

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