chore: update config

This commit is contained in:
gaoshuaixing
2025-01-13 10:56:42 +08:00
parent d386ebe5e9
commit a76ee1e5f4
5 changed files with 64 additions and 43 deletions

View File

@@ -128,18 +128,36 @@ module.exports = {
* 加密
*/
encrypt: {
type: 'confusion', // none | confusion | bytecode | strict
files: [
'./public/electron/**/*.(js|json)',
],
fileExt: ['.js'],
cleanFiles: ['./public/electron'],
specificFiles: ['./public/electron/preload/bridge.js'],
confusionOptions: {
compact: true,
stringArray: true,
stringArrayEncoding: ['none'],
deadCodeInjection: false,
frontend: {
type: 'confusion',
files: [
'./public/dist/**/*.(js|json)',
],
cleanFiles: ['./public/dist'],
confusionOptions: {
compact: true,
stringArray: true,
stringArrayEncoding: ['none'],
stringArrayCallsTransform: true,
numbersToExpressions: true,
target: 'browser',
}
},
electron: {
type: 'confusion',
files: [
'./public/electron/**/*.(js|json)',
],
cleanFiles: ['./public/electron'],
confusionOptions: {
compact: true,
stringArray: true,
stringArrayEncoding: ['rc4'],
deadCodeInjection: false,
stringArrayCallsTransform: true,
numbersToExpressions: true,
target: 'node',
}
}
},

View File

@@ -4,6 +4,7 @@ import { getMainWindow } from 'ee-core/electron';
import { isProd, getBaseDir } from 'ee-core/ps';
import { getConfig } from 'ee-core/config';
import { isFileProtocol } from 'ee-core/utils';
import { logger } from 'ee-core/log';
/**
* Window
@@ -40,7 +41,7 @@ class WindowService {
contentUrl = addr + content;
}
console.log('contentUrl: ', contentUrl);
logger.info('[createWindow] url: ', contentUrl);
const opt = {
title: windowTitle,
x: 10,

View File

@@ -1,6 +1,6 @@
{
"name": "ee",
"version": "1.0.0",
"version": "4.0.0",
"scripts": {
"dev": "vite --host --port 8080",
"serve": "vite --host --port 8080",

View File

@@ -1,27 +1,27 @@
export default [
{ name: '对话框', type: 'icon-duihuakuang' },
{ name: '闹钟', type: 'icon-naozhong' },
{ name: '笑脸', type: 'icon-xiaolian' },
{ name: 'ok', type: 'icon-ok' },
{ name: '风车', type: 'icon-fengche' },
{ name: '汗颜', type: 'icon-hanyan' },
{ name: '相机', type: 'icon-xiangji' },
{ name: '礼物', type: 'icon-liwu' },
{ name: '礼花', type: 'icon-lihua' },
{ name: '扭蛋', type: 'icon-niudan' },
{ name: '流星', type: 'icon-liuxing' },
{ name: '风筝', type: 'icon-fengzheng' },
{ name: '蛋糕', type: 'icon-dangao' },
{ name: '泡泡', type: 'icon-paopao' },
{ name: '购物', type: 'icon-gouwu' },
{ name: '饮料', type: 'icon-yinliao' },
{ name: '云彩', type: 'icon-yuncai' },
{ name: '彩铅', type: 'icon-caiqian' },
{ name: '纸飞机', type: 'icon-zhifeiji' },
{ name: '点赞', type: 'icon-dianzan' },
{ name: '煎蛋', type: 'icon-jiandan' },
{ name: '小熊', type: 'icon-xiaoxiong' },
{ name: '花', type: 'icon-hua' },
{ name: '眼睛', type: 'icon-yanjing' },
]
{ name: '对话框', type: 'icon-duihuakuang' },
{ name: '闹钟', type: 'icon-naozhong' },
{ name: '笑脸', type: 'icon-xiaolian' },
{ name: 'ok', type: 'icon-ok' },
{ name: '风车', type: 'icon-fengche' },
{ name: '汗颜', type: 'icon-hanyan' },
{ name: '相机', type: 'icon-xiangji' },
{ name: '礼物', type: 'icon-liwu' },
{ name: '礼花', type: 'icon-lihua' },
{ name: '扭蛋', type: 'icon-niudan' },
{ name: '流星', type: 'icon-liuxing' },
{ name: '风筝', type: 'icon-fengzheng' },
{ name: '蛋糕', type: 'icon-dangao' },
{ name: '泡泡', type: 'icon-paopao' },
{ name: '购物', type: 'icon-gouwu' },
{ name: '饮料', type: 'icon-yinliao' },
{ name: '云彩', type: 'icon-yuncai' },
{ name: '彩铅', type: 'icon-caiqian' },
{ name: '纸飞机', type: 'icon-zhifeiji' },
{ name: '点赞', type: 'icon-dianzan' },
{ name: '煎蛋', type: 'icon-jiandan' },
{ name: '小熊', type: 'icon-xiaoxiong' },
{ name: '花', type: 'icon-hua' },
{ name: '眼睛', type: 'icon-yanjing' },
]

View File

@@ -5,7 +5,7 @@
"main": "./public/electron/main.js",
"scripts": {
"dev": "ee-bin dev",
"build": "npm run build-frontend && ee-bin encrypt",
"build": "npm run build-frontend && npm run build-electron && ee-bin encrypt",
"start": "ee-bin start",
"dev-frontend": "ee-bin dev --serve=frontend",
"dev-electron": "ee-bin dev --serve=electron",
@@ -13,18 +13,20 @@
"dev-go-w": "ee-bin exec --cmds=go_w",
"dev-python": "ee-bin exec --cmds=python",
"build-frontend": "ee-bin build --cmds=frontend && ee-bin move --flag=frontend_dist",
"build-electron": "ee-bin build --cmds=electron",
"build-go-w": "ee-bin move --flag=go_static,go_config,go_package && ee-bin build --cmds=go_w",
"build-go-m": "ee-bin move --flag=go_static,go_config,go_package,go_images && ee-bin build --cmds=go_m",
"build-go-l": "ee-bin move --flag=go_static,go_config,go_package,go_images && ee-bin build --cmds=go_l",
"build-python": "ee-bin build --cmds=python && ee-bin move --flag=python_dist",
"encrypt": "ee-bin encrypt",
"clean": "ee-bin clean",
"icon": "ee-bin icon",
"re-sqlite": "electron-rebuild -f -w better-sqlite3",
"build-w": "ee-bin build --cmds=win64",
"build-we": "ee-bin build --cmds=win_e",
"build-m": "ee-bin build --cmds=mac",
"build-m-arm64": "ee-bin build --cmds=mac_arm64",
"build-l": "ee-bin build --cmds=linux",
"clean": "ee-bin clean",
"icon": "ee-bin icon",
"re-sqlite": "electron-rebuild -f -w better-sqlite3",
"debug-dev": "cross-env DEBUG=ee-* ee-bin dev",
"debug-encrypt": "ee-bin encrypt",
"debug-electron": "cross-env DEBUG=ee-* ee-bin dev --serve=electron",