project

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: May 22, 2021 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCreateCmd

func NewCreateCmd(f *cmdutil.Factory) *cobra.Command

NewCreateCmd creates a command that can create projects from project skeletons using a variety of user-defined options.

Types

type CreateOptions

type CreateOptions struct {
	cli.IOStreams

	Config     func() (*kickoff.Config, error)
	GitClient  func() git.Client
	HTTPClient func() *http.Client
	Repository func(...string) (kickoff.Repository, error)
	Prompt     prompt.Prompt

	ProjectName  string
	ProjectDir   string
	ProjectHost  string
	ProjectOwner string
	License      string
	Gitignore    string
	Values       template.Values

	RepoNames      []string
	SkeletonNames  []string
	AutoApprove    bool
	Interactive    bool
	InitGit        bool
	Overwrite      bool
	OverwriteFiles []string
	SkipFiles      []string
	// contains filtered or unexported fields
}

CreateOptions holds the options for the create command.

func (*CreateOptions) AddFlags

func (o *CreateOptions) AddFlags(cmd *cobra.Command)

AddFlags adds flags for all project creation options to cmd.

func (*CreateOptions) Complete

func (o *CreateOptions) Complete() (err error)

Complete completes the project creation options.

func (*CreateOptions) Run

func (o *CreateOptions) Run() error

Run loads all project skeletons that the user provided and creates the project at the output directory.

Jump to

Keyboard shortcuts

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