5
0
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:
Lea Anthony 2019-01-08 17:48:37 +11:00
parent 4742fd7ed2
commit aa6b67734b
9 changed files with 23 additions and 10 deletions

View File

@ -10,8 +10,7 @@ import (
"path/filepath"
"runtime"
"strings"
"github.com/alecthomas/template"
"text/template"
)
const templateSuffix = ".template"

View File

@ -0,0 +1 @@
module {{.BinaryName}}

View File

@ -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()

View File

@ -0,0 +1 @@
module {{.BinaryName}}

View File

@ -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()

View File

@ -1,5 +1,6 @@
{
"name": "frontend",
"name": "{{.NPMProjectName}}",
"author": "{{.Author.Name}}<{{.Author.Email}}>",
"version": "0.1.0",
"private": true,
"scripts": {

View File

@ -0,0 +1 @@
module {{.BinaryName}}

View File

@ -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"),
})

View File

@ -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