templates

package
v2.5.0 Latest Latest
Warning

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

Go to latest
Published: May 13, 2023 License: MIT Imports: 16 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

type Data struct {
	ProjectName        string
	BinaryName         string
	WailsVersion       string
	NPMProjectName     string
	AuthorName         string
	AuthorEmail        string
	AuthorNameAndEmail string
	WailsDirectory     string
	GoSDKPath          string
	WindowsFlags       string
	CGOEnabled         string
	OutputFile         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
	PathToDesktopBinary string
	PathToServerBinary  string
	InitGit             bool
	AuthorName          string
	AuthorEmail         string
	IDE                 string
	ProjectNameFilename string // The project name but as a valid filename
	WailsVersion        string
	GoSDKPath           string
	WindowsFlags        string
	CGOEnabled          string
	CGOLDFlags          string
	OutputFile          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
	FS gofs.FS `json:"-"`
}

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

func Install

func Install(options *Options) (bool, *Template, error)

Install the given template. Returns true if the template is remote.

func List

func List() ([]Template, error)

List returns the list of available templates

Directories

Path Synopsis
templates
lit
vue

Jump to

Keyboard shortcuts

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