Documentation ¶
Index ¶
- Constants
- Variables
- func Apply(inputDir string, vars collections.IDictionary, outputDir string) error
- func AskPrompts(prompts Prompts, overrides collections.IDictionary, input io.ReadCloser) (collections.IDictionary, error)
- func AskQuestion(question string, choices []string, input io.ReadCloser) (string, error)
- func Create(inputDir string, overrides map[string]string, targetDir string) error
- func IsCollection(dir string) (bool, []string)
- func PrepareChoices(prompt Prompt, input io.ReadCloser) (promptui.Select, error)
- func PreparePrompt(prompt Prompt, input io.ReadCloser) (promptui.Prompt, error)
- func ReadFile(path string) (string, error)
- func ReadOverrides(overrideFile string) (collections.IDictionary, error)
- func URLToFs(url string, subPath string, tmpDir string) (string, error)
- type Prompt
- type Prompts
- type SourceFile
Constants ¶
View Source
const ( PromptFile string = "prompts.toml" OverrideFile string = ".override.toml" ReplacementDelimiter string = "{&{&" )
Variables ¶
View Source
var ( ReservedPromptVariables = []string{} IgnoredNames = []string{PromptFile, OverrideFile} IgnoredDirectories = []string{".git", "node_modules"} )
Functions ¶
func Apply ¶
func Apply(inputDir string, vars collections.IDictionary, outputDir string) error
func AskPrompts ¶
func AskPrompts(prompts Prompts, overrides collections.IDictionary, input io.ReadCloser) (collections.IDictionary, error)
func AskQuestion ¶
func IsCollection ¶
If there is no top level prompts and some subdirectories contain prompts, then we're dealing with a collection. Otherwise it's scaffolding with no prompts
func PrepareChoices ¶
func PreparePrompt ¶
func ReadOverrides ¶
func ReadOverrides(overrideFile string) (collections.IDictionary, error)
Types ¶
type SourceFile ¶
func Replace ¶
func Replace(vars collections.IDictionary, file SourceFile) (SourceFile, error)
Click to show internal directories.
Click to hide internal directories.