project

package
v2.0.0-beta.33 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Author

type Author struct {
	Name  string `json:"name"`
	Email string `json:"email"`
}

Author stores details about the application author

type Info

type Info struct {
	CompanyName    string  `json:"companyName"`
	ProductName    string  `json:"productName"`
	ProductVersion string  `json:"productVersion"`
	Copyright      *string `json:"copyright"`
	Comments       *string `json:"comments"`
}

type Project

type Project struct {

	/*** Application Data ***/
	Name           string `json:"name"`
	AssetDirectory string `json:"assetdir,omitempty"`

	ReloadDirectories string `json:"reloaddirs,omitempty"`

	BuildCommand   string `json:"frontend:build"`
	InstallCommand string `json:"frontend:install"`

	// Commands used in `wails dev`
	DevCommand        string `json:"frontend:dev"`
	DevWatcherCommand string `json:"frontend:dev:watcher"`

	// Directory to generate the API Module
	WailsJSDir string `json:"wailsjsdir"`

	Version string `json:"version"`

	// The path to the project directory
	Path string

	// Build directory
	BuildDir string

	// The output filename
	OutputFilename string `json:"outputfilename"`

	// The type of application. EG: Desktop, Server, etc
	OutputType string

	// The platform to target
	Platform string

	// RunNonNativeBuildHooks will run build hooks though they are defined for a GOOS which is not equal to the host os
	RunNonNativeBuildHooks bool `json:"runNonNativeBuildHooks"`

	// Post build hooks for different targets, the hooks are executed in the following order
	// Key: GOOS/GOARCH - Executed at build level after a build of the specific platform and arch
	// Key: GOOS/*      - Executed at build level after a build of the specific platform
	// Key: */*         - Executed at build level after a build
	// The following keys are not yet supported.
	// Key: GOOS        - Executed at platform level after all builds of the specific platform
	// Key: *           - Executed at platform level after all builds of a platform
	// Key: [empty]     - Executed at global level after all builds of all platforms
	PostBuildHooks map[string]string `json:"postBuildHooks"`

	// The application author
	Author Author

	// The application information
	Info Info

	// The debounce time for hot-reload of the built-in dev server. Default 100
	DebounceMS int `json:"debounceMS"`

	// The url to use to server assets. Default "https://localhost:34115"
	DevServerURL string `json:"devserverurl"`

	// Arguments that are forwared to the application in dev mode
	AppArgs string `json:"appargs"`

	// NSISType to be build
	NSISType string `json:"nsisType"`
	// contains filtered or unexported fields
}

Project holds the data related to a Wails project

func Load

func Load(projectPath string) (*Project, error)

Load the project from the current working directory

func (*Project) Save

func (p *Project) Save() error

Jump to

Keyboard shortcuts

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