watcher

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2017 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Blueprint

type Blueprint struct {
	*settings.Settings `yaml:"-"`
	Projects           []Project   `yaml:"projects,omitempty" json:"projects,omitempty"`
	Sync               chan string `yaml:"-"`
}

Blueprint struct contains a projects list

func (*Blueprint) Add

func (h *Blueprint) Add(p *cli.Context) error

Add a new project

func (*Blueprint) Clean

func (h *Blueprint) Clean()

Clean duplicate projects

func (*Blueprint) List

func (h *Blueprint) List() error

List of all the projects

func (*Blueprint) Remove

func (h *Blueprint) Remove(p *cli.Context) error

Remove a project

func (*Blueprint) Run

func (h *Blueprint) Run(p *cli.Context) error

Run launches the toolchain for each project

type Buffer

type Buffer struct {
	StdOut []BufferOut `json:"stdOut"`
	StdLog []BufferOut `json:"stdLog"`
	StdErr []BufferOut `json:"stdErr"`
}

Buffer define an array buffer for each log files

type BufferOut

type BufferOut struct {
	Time   time.Time `json:"time"`
	Text   string    `json:"text"`
	Path   string    `json:"path"`
	Type   string    `json:"type"`
	Stream string    `json:"stream"`
	Errors []string  `json:"errors"`
}

BufferOut is used for exchange information between "realize cli" and "web realize"

type Cmd added in v1.4.1

type Cmd struct {
	Status bool     `yaml:"status" json:"status"`
	Args   []string `yaml:"args,omitempty" json:"args,omitempty"`
}

Buildmode options

type Cmds added in v1.4.1

type Cmds struct {
	Vet      bool `yaml:"vet" json:"vet"`
	Fmt      bool `yaml:"fmt" json:"fmt"`
	Test     bool `yaml:"test" json:"test"`
	Generate bool `yaml:"generate" json:"generate"`
	Bin      Cmd  `yaml:"bin" json:"bin"`
	Build    Cmd  `yaml:"build" json:"build"`
	Run      bool `yaml:"run" json:"run"`
}

type Command added in v1.4.1

type Command struct {
	Type    string `yaml:"type" json:"type"`
	Command string `yaml:"command" json:"command"`
	Path    string `yaml:"path,omitempty" json:"path,omitempty"`
	Changed bool   `yaml:"changed,omitempty" json:"changed,omitempty"`
	Startup bool   `yaml:"startup,omitempty" json:"startup,omitempty"`
}

Command options

type Project

type Project struct {
	settings.Settings `yaml:"-"`
	LastChangedOn     time.Time `yaml:"-" json:"-"`

	Name               string            `yaml:"name" json:"name"`
	Path               string            `yaml:"path" json:"path"`
	Environment        map[string]string `yaml:"environment,omitempty" json:"environment,omitempty"`
	Cmds               Cmds              `yaml:"commands" json:"commands"`
	Args               []string          `yaml:"args,omitempty" json:"args,omitempty"`
	Watcher            Watcher           `yaml:"watcher" json:"watcher"`
	Streams            Streams           `yaml:"streams,omitempty" json:"streams,omitempty"`
	Buffer             Buffer            `yaml:"-" json:"buffer"`
	ErrorOutputPattern string            `yaml:"errorOutputPattern,omitempty" json:"errorOutputPattern,omitempty"`
	// contains filtered or unexported fields
}

Project defines the informations of a single project

type Streams added in v1.4.1

type Streams struct {
	FileOut bool `yaml:"file_out" json:"file_out"`
	FileLog bool `yaml:"file_log" json:"file_log"`
	FileErr bool `yaml:"file_err" json:"file_err"`
}

Streams is a collection of names and values for the logs functionality

type Watcher

type Watcher struct {
	Preview bool      `yaml:"preview" json:"preview"`
	Paths   []string  `yaml:"paths" json:"paths"`
	Ignore  []string  `yaml:"ignore_paths" json:"ignore"`
	Exts    []string  `yaml:"exts" json:"exts"`
	Scripts []Command `yaml:"scripts,omitempty" json:"scripts,omitempty"`
}

Watcher struct defines the livereload's logic

Jump to

Keyboard shortcuts

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