build

package
v2.0.0-alpha.15 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2020 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendArg

func AppendArg(args []string, name string, arg ...string) []string

func Plugins

func Plugins() []plugins.Plugin

Types

type AfterBuilder

type AfterBuilder interface {
	plugins.Plugin
	AfterBuild(ctx context.Context, root string, args []string, err error) error
}

type Aliaser

type Aliaser interface {
	Builder
	CmdAliases() []string
}

type BeforeBuilder

type BeforeBuilder interface {
	plugins.Plugin
	BeforeBuild(ctx context.Context, root string, args []string) error
}

type BuildArger

type BuildArger interface {
	plugins.Plugin
	// GoBuildArgs receives the current list
	// and returns either the same list, or
	// a modified version of the arguments.
	// Implementations are responsible for ensuring
	// that the arguments returned are "valid"
	// arguments for the `go build` command.
	GoBuildArgs(ctx context.Context, root string, args []string) ([]string, error)
}

type Builder

type Builder interface {
	plugins.Plugin
	Build(ctx context.Context, root string, args []string) error
}

Builder is a sub-command of buffalo build.

buffalo build webpack

func FindBuilder

func FindBuilder(name string, plugs []plugins.Plugin) Builder

func FindBuilderFromArgs

func FindBuilderFromArgs(args []string, plugs []plugins.Plugin) Builder

type Cmd

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

func (*Cmd) CmdAliases

func (*Cmd) CmdAliases() []string

func (Cmd) Description

func (Cmd) Description() string

func (*Cmd) Flags

func (cmd *Cmd) Flags() *pflag.FlagSet

Flags returns a defined set of flags for this command. It imports flags provided by plugins that use either the `Flagger` or `Pflagger` interfaces. Flags provided by plugins will have their shorthand ("-x") flag stripped and the name ("--some-flag") of the flag will be prefixed with the plugin's name ("--xyz-some-flag")

func (*Cmd) Main

func (cmd *Cmd) Main(ctx context.Context, root string, args []string) error

func (Cmd) PluginName

func (b Cmd) PluginName() string

func (*Cmd) PrintFlags

func (cmd *Cmd) PrintFlags(w io.Writer) error

func (*Cmd) ScopedPlugins

func (bc *Cmd) ScopedPlugins() []plugins.Plugin

func (*Cmd) SubCommands

func (bc *Cmd) SubCommands() []plugins.Plugin

func (*Cmd) WithPlugins

func (cmd *Cmd) WithPlugins(f plugins.Feeder)

type Flagger

type Flagger interface {
	plugins.Plugin
	BuildFlags() []*flag.Flag
}

type GoBuilder

type GoBuilder interface {
	plugins.Plugin
	// GoBuild will be called to build, and execute, the
	// presented context and args.
	// The first plugin to receive this call will be the
	// only to answer it.
	GoBuild(ctx context.Context, root string, cmd *exec.Cmd) error
}

type Importer

type Importer interface {
	plugins.Plugin
	BuildImports(ctx context.Context, root string) ([]string, error)
}

type MainFile

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

func (*MainFile) AfterBuild

func (bc *MainFile) AfterBuild(ctx context.Context, root string, args []string, err error) error

func (*MainFile) BeforeBuild

func (bc *MainFile) BeforeBuild(ctx context.Context, root string, args []string) error

func (MainFile) HidePlugin

func (MainFile) HidePlugin()

func (MainFile) PluginName

func (MainFile) PluginName() string

func (*MainFile) ScopedPlugins

func (bc *MainFile) ScopedPlugins() []plugins.Plugin

func (*MainFile) Version

func (bc *MainFile) Version(ctx context.Context, root string) (string, error)

func (*MainFile) WithPlugins

func (bc *MainFile) WithPlugins(f plugins.Feeder)

type Namer

type Namer interface {
	Builder
	CmdName() string
}

type PackFiler

type PackFiler interface {
	plugins.Plugin
	PackageFiles(ctx context.Context, root string) ([]string, error)
}

type Packager

type Packager interface {
	plugins.Plugin
	Package(ctx context.Context, root string, files []string) error
}

type Pflagger

type Pflagger interface {
	plugins.Plugin
	BuildFlags() []*pflag.Flag
}

type Stderrer

type Stderrer = plugio.Errer

type Stdiner

type Stdiner = plugio.Inner

type Stdouter

type Stdouter = plugio.Outer

type Versioner

type Versioner interface {
	plugins.Plugin
	BuildVersion(ctx context.Context, root string) (string, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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