devtools

package module
v0.0.28 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2023 License: GPL-3.0 Imports: 19 Imported by: 0

README

Boardzilla devtools

Use this to develop your boardzilla game

Usage

Run ./scripts/dev [path to game], then, open your browser to http://localhost:8080

Documentation

Index

Constants

View Source
const (
	UI = iota
	Game
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildCommand

type BuildCommand struct {
	Dev        string `json:"dev"`
	Production string `json:"prod"`
}

type Builder

type Builder struct {
	// contains filtered or unexported fields
}

func NewBuilder

func NewBuilder(root string) (*Builder, error)

func (*Builder) Build

func (b *Builder) Build() error

func (*Builder) BuildGame

func (b *Builder) BuildGame() ([]byte, []byte, error)

func (*Builder) BuildProd

func (b *Builder) BuildProd() error

func (*Builder) BuildUI

func (b *Builder) BuildUI() ([]byte, []byte, error)

func (*Builder) Clean

func (b *Builder) Clean() error

func (*Builder) Manifest

func (b *Builder) Manifest() (*ManifestV1, error)

func (*Builder) WatchedFiles

func (b *Builder) WatchedFiles() ([]string, error)

type GameConfig

type GameConfig struct {
	Root         string       `json:"root"`
	BuildCommand BuildCommand `json:"build"`
	WatchPaths   []string     `json:"watchPaths"`
	OutputFile   string       `json:"out"`
}

type ManifestV1

type ManifestV1 struct {
	Name           string     `json:"name"`
	FriendlyName   string     `json:"friendlyName"`
	Tagline        string     `json:"tagline"`
	Description    string     `json:"description"`
	MinimumPlayers int        `json:"minPlayers"`
	MaximumPlayers int        `json:"maxPlayers"`
	UI             UIConfig   `json:"ui"`
	Game           GameConfig `json:"game"`
	Image          string     `json:"image"`
}

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer(gameRoot string, manifest *ManifestV1, port int) (*Server, error)

func (*Server) BuildError

func (s *Server) BuildError(t int, o, e string)

func (*Server) Reload

func (s *Server) Reload(t int)

func (*Server) Serve

func (s *Server) Serve() error

type UIConfig

type UIConfig struct {
	Root            string       `json:"root"`
	BuildCommand    BuildCommand `json:"build"`
	WatchPaths      []string     `json:"watchPaths"`
	OutputDirectory string       `json:"outDir"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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