mirror of
https://github.com/taigrr/wails.git
synced 2026-04-02 05:08:54 -07:00
Merge pull request #140 from wailsapp/139-go.mod-should-reflect-current-wails-version
feat: set wails version in go.mod
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 {
|
||||
|
||||
3
cmd/templates/create-react-app/.jshint
Normal file
3
cmd/templates/create-react-app/.jshint
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"esversion": 6
|
||||
}
|
||||
@@ -1 +1,5 @@
|
||||
module {{.BinaryName}}
|
||||
module {{.BinaryName}}
|
||||
|
||||
require (
|
||||
github.com/wailsapp/wails {{.WailsVersion}}
|
||||
)
|
||||
3
cmd/templates/vuebasic/.jshint
Normal file
3
cmd/templates/vuebasic/.jshint
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"esversion": 6
|
||||
}
|
||||
@@ -1 +1,5 @@
|
||||
module {{.BinaryName}}
|
||||
module {{.BinaryName}}
|
||||
|
||||
require (
|
||||
github.com/wailsapp/wails {{.WailsVersion}}
|
||||
)
|
||||
@@ -1 +1,5 @@
|
||||
module {{.BinaryName}}
|
||||
module {{.BinaryName}}
|
||||
|
||||
require (
|
||||
github.com/wailsapp/wails {{.WailsVersion}}
|
||||
)
|
||||
Reference in New Issue
Block a user