oyafile

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: May 20, 2019 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrTaskFail added in v0.0.9

type ErrTaskFail struct {
	TaskName task.Name
	Args     []string
}

func (ErrTaskFail) Error added in v0.0.9

func (e ErrTaskFail) Error() string

type Oyafile

type Oyafile struct {
	Dir      string
	Path     string
	RootDir  string
	Shell    string
	Imports  map[types.Alias]types.ImportPath
	Tasks    task.Table
	Values   template.Scope
	Project  string   // Project is set for root Oyafile.
	Ignore   []string // Ignore contains directory exclusion rules.
	Requires []PackReference
	// Replacements map packs to local paths relative to project root directory for development based on the Replace: directive.
	Replacements PackReplacements
	IsBuilt      bool
	// contains filtered or unexported fields
}

func Load

func Load(oyafilePath, rootDir string) (*Oyafile, bool, error)

func LoadFromDir

func LoadFromDir(dirPath, rootDir string) (*Oyafile, bool, error)

func New

func New(oyafilePath string, rootDir string) (*Oyafile, error)

func Parse

func Parse(raw *raw.Oyafile) (*Oyafile, error)

func (*Oyafile) Build

func (oyafile *Oyafile) Build(loader PackLoader) error

func (Oyafile) Equals

func (oyafile Oyafile) Equals(other Oyafile) bool

func (*Oyafile) Ignores

func (o *Oyafile) Ignores() string

func (*Oyafile) RelPath

func (o *Oyafile) RelPath() string

func (Oyafile) RunTask

func (oyafile Oyafile) RunTask(taskName task.Name, args []string, scope template.Scope, stdout, stderr io.Writer) (bool, error)

type PackLoader

type PackLoader interface {
	Load(importPath types.ImportPath) (*Oyafile, bool, error)
}

type PackReference

type PackReference struct {
	ImportPath types.ImportPath
	Version    semver.Version
	// ReplacementPath is a path relative to the root directory, when the replacement for the pack can be found, based on the Replace: directive.
	ReplacementPath string
}

type PackReplacements

type PackReplacements map[types.ImportPath]string

Jump to

Keyboard shortcuts

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