Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var BinaryFileExt = []string{}/* 244 elements not displayed */
BinaryFileExt is a list of common binary files. Usually they aren't shipped with the template but could lead to a crash. Source: https://github.com/sindresorhus/binary-extensions/blob/master/binary-extensions.json
var ExcludedDirs = []string{
"node_modules",
"bower_components",
"jspm_packages",
"dist",
"build",
"log",
"logs",
"bin",
"lib",
"typings",
}
ExcludedDirs is a list of common directorys which are used store application files Usually they aren't shipped with the template but could lead to a crash.
Functions ¶
Types ¶
type CommandData ¶ added in v0.0.19
CommandData contains all project data
type Hook ¶ added in v0.0.19
type Hook struct { Cmd string `json:"cmd"` Args []string `json:"args"` Enabled string `json:"enabled"` }
Hook represent a hook in the yml file
type Option ¶
type Option func(*Templating)
Option function.
func WithCommandData ¶ added in v0.0.19
func WithCommandData(cd *CommandData) Option
WithCommandData option.
func WithTemplateSurveyResults ¶ added in v0.0.21
WithTemplateSurveyResults option.
type Question ¶ added in v0.0.14
type Question struct { Type string `json:"type"` Name string `json:"name"` Default interface{} `json:"default"` Options []string `json:"options"` Message string `json:"message"` Required bool `json:"required"` Help string `json:"help"` }
Question represents a question in the yml file
type Survey ¶ added in v0.0.14
type Survey struct { Questions []Question `yaml:"questions"` AfterHooks []Hook `yaml:"afterHooks"` }
Survey represents in the yml file
func ReadSurveyConfig ¶ added in v0.0.14
ReadSurveyConfig reads the config and return a new survey
type TemplateData ¶ added in v0.0.18
type TemplateData struct { Project *CommandData Date string Year int Vars map[string]string }
TemplateData basic template data
type Templating ¶
type Templating struct { Templates []config.Template Variables map[string]string CommandData *CommandData TemplateData *TemplateData // contains filtered or unexported fields }
Templating command
func (*Templating) Skip ¶ added in v0.0.14
Skip returns an error when a directory should be skipped or true with a file
func (*Templating) StartCommandSurvey ¶ added in v0.0.19
func (t *Templating) StartCommandSurvey() error
StartCommandSurvey collect all required informations from user