models

package
v0.0.0-...-3cdc48a Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DestPrompt

func DestPrompt(opt *CmdOptionsModel)

func NamePrompt

func NamePrompt(opt *CmdOptionsModel)

func ShouldOverwritePrompt

func ShouldOverwritePrompt() bool

func TypePrompt

func TypePrompt(opt *CmdOptionsModel)

func UsesKebabCasePrompt

func UsesKebabCasePrompt(opt *CmdOptionsModel)

func WithStorybookPrompt

func WithStorybookPrompt(opt *CmdOptionsModel)

func WithTestPrompt

func WithTestPrompt(opt *CmdOptionsModel)

Types

type CmdOptionsModel

type CmdOptionsModel struct {
	Type string

	Name string

	Dest          string
	OnlyDryRun    bool
	UsesKebabCase bool
	WithStorybook bool
	WithTest      bool

	FileName  string
	ReactName string
}

func NewCmdOptions

func NewCmdOptions() *CmdOptionsModel

func (*CmdOptionsModel) SetNames

func (m *CmdOptionsModel) SetNames()

type File

type File struct {
	Name      string
	Extension string
}

type Generator

type Generator struct {
	// contains filtered or unexported fields
}

func NewGenerator

func NewGenerator(cmdType string, opt *CmdOptionsModel, vars TmplVars) *Generator

func (*Generator) GenerateFiles

func (g *Generator) GenerateFiles(files []File)

type TmplVars

type TmplVars map[string]any

Jump to

Keyboard shortcuts

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