Documentation ¶
Overview ¶
You can use the "packr clean" command to clean up this, and any other packr generated files.
Index ¶
Constants ¶
const ( // EvtBuildStart is emitted when building starts EvtBuildStart = "buffalo:build:start" // EvtBuildStop is emitted when building stops EvtBuildStop = "buffalo:build:stop" // EvtBuildStopErr is emitted when building is stopped due to an error EvtBuildStopErr = "buffalo:build:stop:err" )
Variables ¶
This section is empty.
Functions ¶
func GoTemplateValidator ¶
GoTemplateValidator validates the file is a valid Go text/template file if the extension is .tmpl
func New ¶
New generator for building a Buffalo application This powers the `buffalo build` command and can be used to programatically build/compile Buffalo applications.
func PlushValidator ¶
PlushValidator validates the file is a valid Plush file if the extension is .md, .html, or .plush
func ValidateTemplates ¶
func ValidateTemplates(walk packd.Walker, tvs []TemplateValidator) genny.RunFn
ValidateTemplates returns a genny.RunFn that will walk the given box and run each of the files found through each of the template validators
Types ¶
type Options ¶
type Options struct { meta.App // the "timestamp" of the build. defaults to time.Now() BuildTime time.Time `json:"build_time,omitempty"` // the "version" of the build. defaults to // a) git sha of last commit or // b) to time.RFC3339 of BuildTime BuildVersion string `json:"build_version,omitempty"` // CleanAssets will remove the public/assets folder build compiling CleanAssets bool `json:"clean_assets"` WithAssets bool `json:"with_assets,omitempty"` WithBuildDeps bool `json:"with_build_deps,omitempty"` // places ./public/assets into ./bin/assets.zip. // requires WithAssets = true ExtractAssets bool `json:"extract_assets,omitempty"` // LDFlags to be passed to the final `go build` command LDFlags string `json:"ld_flags,omitempty"` // Tags to be passed to the final `go build` command Tags meta.BuildTags `json:"tags,omitempty"` // BuildFlags to be passed to the final `go build` command BuildFlags []string `json:"build_flags,omitempty"` // Static sets the following flags for the final `go build` command: // -linkmode external // -extldflags "-static" Static bool `json:"static,omitempty"` // Environment the binary is meant for. defaults to "development" Environment string `json:"environment,omitempty"` // TemplateValidators can be used to validate the applications templates. // Empty by default TemplateValidators []TemplateValidator `json:"-"` // Mod is the -mod flag Mod string `json:"mod"` // GoCommand is the `go X` command to be used. Default is "build". GoCommand string `json:"go_command"` // contains filtered or unexported fields }
Options for building a Buffalo application
type TemplateValidator ¶
TemplateValidator is given a file and returns an effort if there is a template validation error with the template