commands

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2022 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddDependencies

func AddDependencies(dependencies map[string][]string)

func AddModuleAliases

func AddModuleAliases(aliases map[string]string)

Types

type Config

type Config struct {
	Spec      string                 `json:"spec" yaml:"spec"`
	Config    map[string]interface{} `json:"config,omitempty" yaml:"config,omitempty"`
	Generates map[string]Target      `json:"generates" yaml:"generates"`
}

type ConfigAndPath

type ConfigAndPath struct {
	Config
	Path string
}

type Context

type Context struct{}

type GenerateCmd

type GenerateCmd struct {
	Config string `arg:"" help:"The code generation configuration file" type:"existingfile" optional:""`
	// contains filtered or unexported fields
}

func (*GenerateCmd) Run

func (c *GenerateCmd) Run(ctx *Context) error

type InstallCmd

type InstallCmd struct {
	Location string `arg:"" help:"The NPM module or Github repository of the module to install."`
	Release  string `arg:"" help:"The release tag to install." optional:""`
	// contains filtered or unexported fields
}

func (*InstallCmd) Run

func (c *InstallCmd) Run(ctx *Context) error

type NewCmd

type NewCmd struct {
	Template  string            `arg:"" help:"The template for the project to create."`
	Dir       string            `arg:"" help:"The project directory"`
	Spec      string            `type:"existingfile" help:"An optional specification file to copy into the project"`
	Variables map[string]string `arg:"" help:"Variables to pass to the template." optional:""`
}

func (*NewCmd) Run

func (c *NewCmd) Run(ctx *Context) error

type Target

type Target struct {
	Module       string                 `json:"module" yaml:"module"`
	VisitorClass string                 `json:"visitorClass" yaml:"visitorClass"`
	IfNotExists  bool                   `json:"ifNotExists,omitempty" yaml:"ifNotExists,omitempty"`
	Executable   bool                   `json:"executable,omitempty" yaml:"executable,omitempty"`
	Config       map[string]interface{} `json:"config,omitempty" yaml:"config,omitempty"`
}

type Template

type Template struct {
	Name         string     `json:"name" yaml:"name"`
	Description  string     `json:"description" yaml:"description"`
	Variables    []Variable `json:"variables" yaml:"variables"`
	SpecLocation string     `json:"specLocation" yaml:"specLocation"`
}

type UpgradeCmd

type UpgradeCmd struct {
}

func (*UpgradeCmd) Run

func (c *UpgradeCmd) Run(ctx *Context) error

type Variable

type Variable struct {
	Name        string `json:"name" yaml:"name"`
	Description string `json:"description" yaml:"description"`
	Prompt      string `json:"prompt" yaml:"prompt"`
	Default     string `json:"default" yaml:"default"`
	Required    bool   `json:"required" yaml:"required"`
	Loop        bool   `json:"loop" yaml:"loop"`
}

type WatchCmd

type WatchCmd struct {
	Configs []string `arg:"" help:"The code generation configuration files" type:"existingfile" optional:""`
}

func (*WatchCmd) Run

func (c *WatchCmd) Run(ctx *Context) error

Jump to

Keyboard shortcuts

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