This commit is contained in:
哆啦好梦
2023-09-07 17:40:35 +08:00
parent ef367f57ea
commit 99ba0ec588
12 changed files with 140 additions and 67 deletions

76
electron/config/bin.js Normal file
View File

@@ -0,0 +1,76 @@
/**
* ee-bin 配置
* 仅适用于开发环境
*/
module.exports = {
/**
* development serve ("frontend" "electron" )
* ee-bin dev
*/
dev: {
frontend: {
directory: './frontend',
cmd: 'npm',
args: ['run', 'dev'],
protocol: 'http://',
hostname: 'localhost',
port: 8080,
indexPath: 'index.html'
},
electron: {
directory: './',
cmd: 'electron',
args: ['.', '--env=local'],
}
},
/**
* 前端构建
* ee-bin build
*/
build: {
directory: './frontend',
cmd: 'npm',
args: ['run', 'build'],
},
/**
* 移动资源
* ee-bin rd
*/
rd: {
dist: './frontend/dist',
target: './public/dist'
},
/**
* 预发布模式prod
* ee-bin start
*/
start: {
directory: './',
cmd: 'electron',
args: ['.', '--env=prod']
},
/**
* 加密
*/
encrypt: {
type: 'confusion',
files: [
'electron/**/*.(js|json)',
'!electron/config/encrypt.js',
'!electron/config/nodemon.json',
'!electron/config/builder.json',
'!electron/config/bin.json',
],
fileExt: ['.js'],
confusionOptions: {
compact: true,
stringArray: true,
stringArrayEncoding: ['none'],
deadCodeInjection: false,
}
}
};