feat: some config

This commit is contained in:
gaoshuaixing
2025-01-12 22:33:59 +08:00
parent eaa3e54c52
commit 89cda57d1d
6 changed files with 36 additions and 50 deletions

View File

@@ -130,7 +130,7 @@ module.exports = {
*/
encrypt: {
frontend: {
type: 'none',
type: 'confusion',
files: [
'./public/dist/**/*.(js|json)',
],
@@ -139,14 +139,13 @@ module.exports = {
compact: true,
stringArray: true,
stringArrayEncoding: ['none'],
deadCodeInjection: false,
stringArrayCallsTransform: false,
numbersToExpressions: false,
stringArrayCallsTransform: true,
numbersToExpressions: true,
target: 'browser',
}
},
electron: {
type: 'none',
type: 'confusion',
files: [
'./public/electron/**/*.(js|json)',
],
@@ -161,21 +160,6 @@ module.exports = {
target: 'node',
}
}
// 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: ['rc4'],
// deadCodeInjection: false,
// stringArrayCallsTransform: true,
// numbersToExpressions: true,
// }
},
/**

View File

@@ -6,6 +6,7 @@ const { getMainWindow } = require('ee-core/electron');
const { isProd, getBaseDir } = require('ee-core/ps');
const { getConfig } = require('ee-core/config');
const { isFileProtocol } = require('ee-core/utils');
const { logger } = require('ee-core/log');
/**
* Window
@@ -32,7 +33,7 @@ class WindowService {
let addr = 'http://localhost:8080'
if (isProd()) {
const { mainServer } = getConfig();
if (isFileProtocol(mainServer)) {
if (isFileProtocol(mainServer.protocol)) {
addr = mainServer.protocol + path.join(getBaseDir(), mainServer.indexPath);
} else {
addr = mainServer.protocol + mainServer.host + ':' + mainServer.port;
@@ -44,7 +45,7 @@ class WindowService {
// some
}
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",
@@ -27,7 +27,7 @@
"postcss": "^8.4.13",
"postcss-pxtorem": "^6.0.0",
"terser": "^5.19.1",
"vite": "^4.4.4",
"vite": "^5.4.11",
"vite-plugin-compression": "^0.5.1"
}
}

View File

@@ -1,5 +1,5 @@
import iconFont from './iconFont'
const modules = import.meta.globEager('./*.vue')
const modules = import.meta.glob('./*.vue', { eager: true })
const map = {}
Object.keys(modules).forEach(file => {
const modulesName = file.replace('./', '').replace('.vue', '')

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

@@ -18,6 +18,7 @@
"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",