templates

package
v2.0.0-alpha.41 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Install

func Install(options *Options) error

Install the given template

func OutputList

func OutputList(logger *clilogger.CLILogger) error

OutputList prints the list of available tempaltes to the given logger

func TemplateShortNames

func TemplateShortNames() (*slicer.StringSlicer, error)

TemplateShortNames returns a slicer of short template names

Types

type Data

type Data struct {
	ProjectName        string
	BinaryName         string
	WailsVersion       string
	NPMProjectName     string
	AuthorName         string
	AuthorEmail        string
	AuthorNameAndEmail string
	WailsDirectory     string
}

Data contains the data we wish to embed during template installation

type Options

type Options struct {
	ProjectName         string
	TemplateName        string
	BinaryName          string
	TargetDir           string
	Logger              *clilogger.CLILogger
	GenerateVSCode      bool
	PathToDesktopBinary string
	PathToServerBinary  string
	InitGit             bool
	AuthorName          string
	AuthorEmail         string
}

Options for installing a template

type Template

type Template struct {

	// Template details
	Name        string `json:"name"`
	ShortName   string `json:"shortname"`
	Author      string `json:"author"`
	Description string `json:"description"`
	HelpURL     string `json:"helpurl"`

	// Other data
	Directory string `json:"-"`
}

Template holds data relating to a template including the metadata stored in template.json

func List

func List() ([]Template, error)

List returns the list of available templates

Directories

Path Synopsis
templates

Jump to

Keyboard shortcuts

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