chore: config

This commit is contained in:
gaoshuaixing
2024-12-16 16:17:57 +08:00
parent 56b01ca177
commit cf45483a33
4 changed files with 43 additions and 52 deletions

View File

@@ -6,7 +6,7 @@ const path = require('path');
* 默认配置
*/
module.exports = (appInfo) => {
console.log("appInfo:", appInfo);
const config = {};
/**
@@ -32,11 +32,11 @@ module.exports = (appInfo) => {
//webSecurity: false,
contextIsolation: false, // false -> 可在渲染进程中使用electron的apitrue->需要bridge.js(contextBridge)
nodeIntegration: true,
//preload: path.join(appInfo.baseDir, 'preload', 'bridge.js'),
//preload: path.join('preload', 'bridge.js'),
},
frame: true,
show: false,
icon: path.join(appInfo.home, 'public', 'images', 'logo-32.png'),
icon: path.join('public', 'images', 'logo-32.png'),
};
/**
@@ -140,39 +140,6 @@ module.exports = (appInfo) => {
messageLog: true
};
/**
* 插件功能
*/
config.addons = {
window: {
enable: true,
},
tray: {
enable: true,
title: 'EE程序',
icon: '/public/images/tray.png'
},
security: {
enable: true,
},
awaken: {
enable: true,
protocol: 'ee',
args: []
},
autoUpdater: {
enable: true,
windows: false,
macOS: false,
linux: false,
options: {
provider: 'generic',
url: 'http://kodo.qiniu.com/'
},
force: false,
}
};
return {
...config
};

View File

@@ -3,7 +3,7 @@
/**
* 开发环境配置,覆盖 config.default.js
*/
module.exports = (appInfo) => {
module.exports = () => {
const config = {};
/**
@@ -16,14 +16,25 @@ module.exports = (appInfo) => {
/**
* 应用程序顶部菜单
*/
config.openAppMenu = true;
config.openAppMenu = false;
/**
* jobs
*/
config.jobs = {
messageLog: true
};
* 内置socket服务
*/
config.socketServer = {
enable: false,
port: 7071,
path: "/socket.io/",
connectTimeout: 45000,
pingTimeout: 30000,
pingInterval: 25000,
maxHttpBufferSize: 1e8,
transports: ["polling", "websocket"],
cors: {
origin: false,
},
channel: 'c1'
};
return {
...config

View File

@@ -1,15 +1,17 @@
'use strict';
/**
* 生产环境配置,覆盖 config.default.js
* 开发环境配置,覆盖 config.default.js
*/
module.exports = (appInfo) => {
module.exports = () => {
const config = {};
/**
* 开发者工具
*/
config.openDevTools = false;
config.openDevTools = {
mode: 'undocked'
};
/**
* 应用程序顶部菜单
@@ -17,11 +19,22 @@ module.exports = (appInfo) => {
config.openAppMenu = false;
/**
* jobs
*/
config.jobs = {
messageLog: false
};
* 内置socket服务
*/
config.socketServer = {
enable: false,
port: 7071,
path: "/socket.io/",
connectTimeout: 45000,
pingTimeout: 30000,
pingInterval: 25000,
maxHttpBufferSize: 1e8,
transports: ["polling", "websocket"],
cors: {
origin: false,
},
channel: 'c1'
};
return {
...config

View File

@@ -16,7 +16,7 @@
"replaced": "^0.1.0-beta.3"
},
"ee-core": {
"signature": "4076fc4dc98ed3cc7ef7e6ba39889f03",
"signature": "dc2e5e7735ddeabcf1a93c704f930909",
"file": true
}
}