new

package
v0.7.5 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoNameProvided = errors.New("the name for the new app is needed")

Functions

This section is empty.

Types

type AfterInitializer

type AfterInitializer interface {
	// AfterInitializers may require to use the passed flags.
	plugins.FlagParser

	// AfterInitialize receives the context and the root folder where
	// the application is being initialized.
	AfterInitialize(context.Context, string, []string) error
}

AfterInitializer is intended to initialize applications, things that should happen at the end of the application creation process.

type Command

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

Command to generate New applications.

func (*Command) FolderName

func (d *Command) FolderName(args []string) string

func (Command) HelpText

func (d Command) HelpText() string

HelpText returns the help Text of build function

func (Command) Name

func (d Command) Name() string

func (Command) ParentName

func (d Command) ParentName() string

func (*Command) Receive

func (d *Command) Receive(plugins []plugins.Plugin)

Receive and store initializers

func (*Command) Run

func (d *Command) Run(ctx context.Context, root string, args []string) error

Run calls NPM or yarn to start webpack watching the assets Also starts refresh listening for the changes in Go files.

type Initializer

type Initializer interface {
	// Initializers may require to use the passed flags.
	plugins.FlagParser

	// Initialize receives the context and the root folder where
	// the application is being initialized.
	Initialize(context.Context, string, []string) error
}

Initializer is intended to initialize applications, things like generating files or running commands.

Jump to

Keyboard shortcuts

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