Documentation ¶
Index ¶
Constants ¶
View Source
const ( ContentDir = "content" ManifestFile = "layout.yaml" )
View Source
const (
MagicVarDir = "dirname" // contains base name of destination directory (aka: project name)
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Condition ¶
type Condition string // tengo, by-default false
type Config ¶
type Config struct { Source string // git URL, shorthand, or path to directory Target string // destination directory Aliases map[string]string // aliases (abbreviations) for cloning, values may contain {0} placeholder Default string // default alias (for cloning without abbreviations, such as owner/repo), value may contain {0} placeholder, default is Github Display ui.UI // how to interact with user, default is Simple TUI Debug bool // enable debug messages and tracing Version string // current version, used to filter manifests by constraints AskOnce bool // do not try to ask for user input after wrong value and interrupt deployment Git gitclient.Client // Git client, default is gitclient.Auto Defaults map[string]interface{} // Global default values }
Config of layout deployment.
type FSTree ¶ added in v1.4.0
type FSTree struct { Name string // path or base name Dir bool // is it directory (used to skip rendering content) Children []*FSTree // child nodes (files or dirs) // contains filtered or unexported fields }
FSTree is general tree which reflects hierarchy of modified files. It's used to track modified files even after rendering and copying.
func (*FSTree) Add ¶ added in v1.4.0
Add node to tree. It's naive implementation and requires O(N*M) complexity, where N is number of sections in path, and M is number of elements per section.
type Manifest ¶
type Manifest struct { Version string // minimal layout version (semver). Empty means any version Title string // short description of what manifest doing, should be unique in multi-layouts repo Description string // full manifest description Delimiters struct { Open string Close string } // custom template delimiter for go templates, default is '{{' and '}}' Prompts []Prompt Default []Default // computed values to define internal default values before processing state, useful in case of condition includes to prevent `undefined variable` error Computed []Computed // computed values used to calculate variables after user input Before []Hook // hook executed before generation After []Hook // hook executed after generation Ignore []string // globs, filtered files will not be templated }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.