5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-03 14:42:03 +08:00

[v2] Misc template updates

This commit is contained in:
Lea Anthony 2021-09-27 19:09:49 +10:00
parent 8565749b0c
commit 828f07ea13
11 changed files with 28 additions and 36 deletions

View File

@ -0,0 +1 @@
<!-- This file is a placeholder to prevent IDE warnings for go:embed --->

View File

@ -4,9 +4,7 @@ import resolve from '@rollup/plugin-node-resolve';
import livereload from 'rollup-plugin-livereload';
import {terser} from 'rollup-plugin-terser';
import copy from 'rollup-plugin-copy';
import image from '@rollup/plugin-image';
import postcss from 'rollup-plugin-postcss'
import url from 'postcss-url';
const production = !process.env.ROLLUP_WATCH;
@ -40,9 +38,6 @@ export default {
file: 'dist/bundle.js'
},
plugins: [
image({
include: './src/assets/images/**'
}),
svelte({
compilerOptions: {
// enable run-time checks when not in production
@ -51,11 +46,6 @@ export default {
}),
postcss({
minimize: true,
plugins: [
url({
url: "inline"
})
]
}),
// If you have external dependencies installed from
// npm, you'll most likely need these plugins. In
@ -70,6 +60,8 @@ export default {
copy({
targets: [
{src: 'src/index.html', dest: 'dist/'},
{src: 'src/global.css', dest: 'dist/'},
{src: 'src/assets', dest: 'dist/'},
]
}),

View File

@ -2,10 +2,10 @@
<html lang="en">
<head>
<meta charset='utf-8'>
<meta name='viewport' content='width=device-width,initial-scale=1'>
<title>Svelte app</title>
<meta content='width=device-width,initial-scale=1' name='viewport'>
<title>{{.ProjectName}}</title>
<link href="/global.css" rel="stylesheet">
<script defer src='bundle.js'></script>
</head>

View File

@ -1,6 +1,4 @@
import App from './App.svelte';
import './global.css';
const app = new App({
target: document.body,

View File

@ -1,4 +1,4 @@
module test
module changeme
go 1.16

View File

@ -19,7 +19,7 @@ func main() {
// Create application with options
err := wails.Run(&options.App{
Title: "{{.ProjectName}}",
Title: "",
Width: 720,
Height: 570,
MinWidth: 720,
@ -31,7 +31,7 @@ func main() {
Frameless: false,
StartHidden: false,
HideWindowOnClose: false,
RGBA: &options.RGBA{255, 255, 255, 255},
RGBA: &options.RGBA{R: 255, G: 255, B: 255, A: 255},
Assets: assets,
LogLevel: logger.DEBUG,
OnStartup: app.startup,
@ -42,9 +42,9 @@ func main() {
},
// Windows platform specific options
Windows: &windows.Options{
WebviewIsTransparent: false,
WindowIsTranslucent: false,
DisableWindowIcon: false,
WebviewIsTransparent: true,
WindowIsTranslucent: true,
DisableWindowIcon: true,
},
})

View File

@ -1,4 +1,4 @@
module test
module changeme
go 1.16

View File

@ -31,7 +31,7 @@ func main() {
Frameless: false,
StartHidden: false,
HideWindowOnClose: false,
RGBA: &options.RGBA{255, 255, 255, 255},
RGBA: &options.RGBA{R: 255, G: 255, B: 255, A: 255},
Assets: assets,
LogLevel: logger.DEBUG,
OnStartup: app.startup,