[v2] Add version to wails.json

This commit is contained in:
Lea Anthony
2021-09-08 23:32:48 +10:00
parent 5d2242f7a4
commit c46182923c

View File

@@ -22,6 +22,8 @@ type Project struct {
// Directory to generate the API Module
WailsJSDir string `json:"wailsjsdir"`
Version string `json:"version"`
/*** Internal Data ***/
// The path to the project directory
@@ -80,6 +82,10 @@ func Load(projectPath string) (*Project, error) {
// Fix up our project paths
result.filename = projectFile
if result.Version == "" {
result.Version = "2"
}
// Create default name if not given
if result.Name == "" {
result.Name = "wailsapp"