feat: set wails version in go.mod

This commit is contained in:
Lea Anthony
2019-06-26 19:46:51 +10:00
parent d07cca0278
commit a9188cbfdd
7 changed files with 26 additions and 3 deletions

View File

@@ -143,11 +143,13 @@ type ProjectOptions struct {
log *Logger
templates *TemplateHelper
selectedTemplate *TemplateDetails
WailsVersion string
}
// Defaults sets the default project template
func (po *ProjectOptions) Defaults() {
po.Template = "vuebasic"
po.WailsVersion = Version
}
// PromptForInputs asks the user to input project details

View File

@@ -160,6 +160,9 @@ func (t *TemplateHelper) InstallTemplate(projectPath string, projectOptions *Pro
templatePath := projectOptions.selectedTemplate.Path
// Save the version
projectOptions.WailsVersion = Version
templateJSONFilename := filepath.Join(templatePath, t.metadataFilename)
templateFiles := templateFilenames.Filter(func(filename string) bool {

View File

@@ -0,0 +1,3 @@
{
"esversion": 6
}

View File

@@ -1 +1,5 @@
module {{.BinaryName}}
module {{.BinaryName}}
require (
github.com/wailsapp/wails {{.WailsVersion}}
)

View File

@@ -0,0 +1,3 @@
{
"esversion": 6
}

View File

@@ -1 +1,5 @@
module {{.BinaryName}}
module {{.BinaryName}}
require (
github.com/wailsapp/wails {{.WailsVersion}}
)

View File

@@ -1 +1,5 @@
module {{.BinaryName}}
module {{.BinaryName}}
require (
github.com/wailsapp/wails {{.WailsVersion}}
)