debug

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithCompiler

func WithCompiler(c *compile.Compiler) func(d *Debugger) error

WithCompiler connects a Compiler to Debugger.

func WithDefaultCompiler

func WithDefaultCompiler() func(d *Debugger) error

WithDefaultCompiler connects a default Compiler to Debugger.

func WithLogger

func WithLogger(l *log.Logger) func(d *Debugger) error

WithLogger overrides the default Debugger logger.

Types

type Debugger

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

Debugger watches sources and re-compile them to serve through the asset object.

func NewDebugger

func NewDebugger(entries, ignore []string, opts ...func(*Debugger) error) *Debugger

NewDebugger watches entry directories and files and copies them to a temporary directory. If the Compiler is provided by options, the files will also be refined by the compiler while being copied. If any of the watched files are changed, the changes are reflected within 1-2 seconds. The returned Debugger is meant to replace a zassets.Store object for live-editing.

func (*Debugger) Open

func (d *Debugger) Open(p string) (http.File, error)

Open fulfills the http.FileSystem interface.

func (*Debugger) Watch

func (d *Debugger) Watch(p ...string) (err error)

Watch observes source objects for changes. Call multiple times, if additional objects need to be added.

Jump to

Keyboard shortcuts

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