go config

This commit is contained in:
gaoshuaixing
2023-11-16 18:13:24 +08:00
parent a39d5b318e
commit e6fda5d1c7
6 changed files with 138 additions and 3 deletions

1
.gitignore vendored
View File

@@ -12,3 +12,4 @@ pnpm-lock.yaml
yalc.lock
go/public/
build/extraResources/core.exe
build/extraResources/goapp.exe

View File

@@ -105,17 +105,17 @@ module.exports = {
go_build_w: {
directory: './go',
cmd: 'go',
args: ['build', '-o', '../build/extraResources/core.exe'],
args: ['build', '-o', '../build/extraResources/goapp.exe'],
},
go_build_m: {
directory: './go',
cmd: 'go',
args: ['build', '-o core', '--env=prod'],
args: ['build', '-o goapp', '--env=prod'],
},
go_build_l: {
directory: './go',
cmd: 'go',
args: ['build', '-o core', '--env=prod'],
args: ['build', '-o goapp', '--env=prod'],
}
},
};

View File

@@ -116,8 +116,22 @@ module.exports = (appInfo) => {
indexPath: '/public/dist/index.html',
host: '127.0.0.1',
port: 7072,
loadingPage: '/public/html/loading.html'
};
/**
* Cross-language service
* 跨语言服务
*/
config.cross = {
go: {
auto: false,
name: 'goapp',
args: ['--env=dev'],
port: 7073,
}
};
/**
* 硬件加速
*/

View File

@@ -25,6 +25,19 @@ module.exports = (appInfo) => {
messageLog: true
};
/**
* Cross-language service
* 跨语言服务
*/
config.cross = {
go: {
auto: true,
name: 'goapp',
args: ['--env=dev'],
port: 7073,
}
};
return {
...config
};

View File

@@ -25,6 +25,19 @@ module.exports = (appInfo) => {
messageLog: false
};
/**
* Cross-language service
* 跨语言服务
*/
config.cross = {
go: {
auto: true,
name: 'goapp',
args: ['--env=dev'],
port: 7073,
}
};
return {
...config
};

94
public/html/loading.html Normal file
View File

@@ -0,0 +1,94 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, maximum-scale=1.0, minimum-scale=1.0" />
<style>
#loadingPage {
background-color: #dedede;
font-size: 12px;
}
.base {
left: 50%;
position: absolute;
top: 50%;
transform: translate(-50%, -50%);
}
.desc {
margin: 0, 0, 20px, 0;
}
.loading,
.loading > div {
position: relative;
box-sizing: border-box;
}
.loading {
display: block;
font-size: 0;
color: #06b359;
}
.loading.la-dark {
color: #07C160;
}
.loading > div {
display: inline-block;
float: none;
background-color: currentColor;
border: 0 solid currentColor;
}
.loading {
width: 92px;
height: 92px;
}
.loading > div {
position: absolute;
top: 50%;
left: 50%;
background: transparent;
border-style: solid;
border-width: 2px;
border-radius: 100%;
animation: ball-clip-rotate-multiple-rotate 1s ease-in-out infinite;
}
.loading > div:first-child {
position: absolute;
width: 92px;
height: 92px;
border-right-color: transparent;
border-left-color: transparent;
}
.loading > div:last-child {
width: 16px;
height: 16px;
border-top-color: transparent;
border-bottom-color: transparent;
animation-duration: 0.5s;
animation-direction: reverse;
}
@keyframes ball-clip-rotate-multiple-rotate {
0% {
transform: translate(-50%, -50%) rotate(0deg);
}
50% {
transform: translate(-50%, -50%) rotate(180deg);
}
100% {
transform: translate(-50%, -50%) rotate(360deg);
}
}
</style>
</head>
<body>
<div id="boot">
<div class='base'>
<div class="loading">
<div></div>
<div></div>
</div>
</div>
</div>
</body>
</html>