prompts

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Blank represents the fontmatter-only template id used when generating the content file.
	Blank string = "blank"
	// Sample represents the sample-content template id used when generating the content file.
	Sample string = "sample"
)
View Source
const (
	Bootstrap   string = "bootstrap"
	Bulma       string = "bulma"
	Scss        string = "scss"
	TailwindCSS string = "tailwindcss"
	VanillaCSS  string = "vanillacss"
)

names for the available CSS Lib options

View Source
const (
	// Svelte set svelte as the language used to scaffold a new page
	Svelte string = "svelte"
	// Markdown set markdown as the language used to scaffold a new page
	Markdown string = "markdown"
)

Variables

This section is empty.

Functions

func AskContentNameHandler

func AskContentNameHandler(inputs []string) (string, error)

AskContentNameHandler if not value, prompts the user to set the content name.

func AskMetadataNameHandler

func AskMetadataNameHandler(inputs []string) (string, error)

AskMetadataNameHandler if not value, prompts the user to set the metadata name.

func AskPageNameHandler

func AskPageNameHandler(inputs []string) (string, error)

AskPageNameHandler if no flag passed, prompts the user to set the page name.

func AskProjectNameHandler

func AskProjectNameHandler(inputs []string) (string, error)

AskProjectNameHandler if no value, prompts the user to set the project name.

func AskResourceNameHandler

func AskResourceNameHandler(inputs []string) (string, error)

AskResourceNameHandler if not value, prompts the user to set the resource name.

func AskThemeName

func AskThemeName(inputs []string) (string, error)

AskThemeName prompts the user to set the theme name.

func SelectCSSLibHandler

func SelectCSSLibHandler(cssLibName string) (string, error)

SelectCSSLibHandler if no flag passed, prompts the user to select the CSS lib to be used with the project.

func SelectMetadataTypeHandler

func SelectMetadataTypeHandler(mdTypeFlag string) (string, error)

SelectMetadataTypeHandler if not flag passed, prompts the user to select the metadata type.

func SelectNPMClientHandler

func SelectNPMClientHandler(items []string, npmClientFlagValue string, logger *logger.Logger) (string, error)

SelectNPMClientHandler if no flag passed, prompts a list of installed npm client and ask the user to select one.

func SelectPageLanguageHandler

func SelectPageLanguageHandler(name string) (string, error)

SelectPageLanguageHandler if not flag passed, prompts the user to select the page type when creating new page.

func SelectResourceHandler

func SelectResourceHandler(fs afero.Fs, mdResourceFlag string, s *config.SveltinSettings) (string, error)

SelectResourceHandler if not flag passed, prompts the user to select the resource from the available ones.

func SelectThemeHandler

func SelectThemeHandler(themeFlag string) (string, error)

SelectThemeHandler if no flag passed, prompts a list of available themes (blank, sveltin)

Types

This section is empty.

Jump to

Keyboard shortcuts

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