mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-02 15:11:53 +08:00
Initial Port
Updated templates
This commit is contained in:
parent
4742fd7ed2
commit
aa6b67734b
@ -10,8 +10,7 @@ import (
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strings"
|
||||
|
||||
"github.com/alecthomas/template"
|
||||
"text/template"
|
||||
)
|
||||
|
||||
const templateSuffix = ".template"
|
||||
|
1
cmd/templates/basic/go.mod.template
Normal file
1
cmd/templates/basic/go.mod.template
Normal file
@ -0,0 +1 @@
|
||||
module {{.BinaryName}}
|
@ -4,7 +4,12 @@ import (
|
||||
wails "github.com/wailsapp/wails"
|
||||
)
|
||||
|
||||
var html = `<h1> Basic Template </h1>`
|
||||
var html = `
|
||||
<div style='text-align:center'>
|
||||
<h1> Basic Template </h1>
|
||||
Welcome to your basic Wails app!
|
||||
</div>
|
||||
`
|
||||
|
||||
func main() {
|
||||
|
||||
@ -12,7 +17,7 @@ func main() {
|
||||
app := wails.CreateApp(&wails.AppConfig{
|
||||
Width: 1024,
|
||||
Height: 768,
|
||||
Title: "My Project",
|
||||
Title: "{{.Name}}",
|
||||
HTML: html,
|
||||
})
|
||||
app.Run()
|
1
cmd/templates/custom/go.mod.template
Normal file
1
cmd/templates/custom/go.mod.template
Normal file
@ -0,0 +1 @@
|
||||
module {{.BinaryName}}
|
@ -4,7 +4,12 @@ import (
|
||||
wails "github.com/wailsapp/wails"
|
||||
)
|
||||
|
||||
var html = `<h1> Custom Project </h1>`
|
||||
var html = `
|
||||
<div style='text-align:center'>
|
||||
<h1> Custom </h1>
|
||||
Welcome to your basic Wails app with added CSS!
|
||||
</div>
|
||||
`
|
||||
|
||||
func main() {
|
||||
|
||||
@ -12,7 +17,7 @@ func main() {
|
||||
app := wails.CreateApp(&wails.AppConfig{
|
||||
Width: 800,
|
||||
Height: 600,
|
||||
Title: "My Project",
|
||||
Title: "{{.Name}}",
|
||||
HTML: html,
|
||||
})
|
||||
app.Run()
|
@ -1,5 +1,6 @@
|
||||
{
|
||||
"name": "frontend",
|
||||
"name": "{{.NPMProjectName}}",
|
||||
"author": "{{.Author.Name}}<{{.Author.Email}}>",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
@ -14,4 +15,4 @@
|
||||
"@vue/cli-service": "^3.1.4",
|
||||
"vue-template-compiler": "^2.5.17"
|
||||
}
|
||||
}
|
||||
}
|
1
cmd/templates/vuewebpack/go.mod.template
Normal file
1
cmd/templates/vuewebpack/go.mod.template
Normal file
@ -0,0 +1 @@
|
||||
module {{.BinaryName}}
|
@ -12,7 +12,7 @@ func main() {
|
||||
app := wails.CreateApp(&wails.AppConfig{
|
||||
Width: 1024,
|
||||
Height: 768,
|
||||
Title: "Vue Simple",
|
||||
Title: "{{.Name}}",
|
||||
JS: assets.String("app.js"),
|
||||
CSS: assets.String("app.css"),
|
||||
})
|
@ -91,7 +91,7 @@ func init() {
|
||||
}
|
||||
|
||||
// Check if frontend deps have been updated
|
||||
buildSpinner.Start("Installing frontend dependencies...")
|
||||
buildSpinner.Start("Installing frontend dependencies (This may take a while)...")
|
||||
|
||||
requiresNPMInstall := true
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user