diff --git a/build/icons/128x128.png b/build/icons/128x128.png new file mode 100644 index 0000000..56b37e1 Binary files /dev/null and b/build/icons/128x128.png differ diff --git a/build/icons/16x16.png b/build/icons/16x16.png new file mode 100644 index 0000000..fc40055 Binary files /dev/null and b/build/icons/16x16.png differ diff --git a/build/icons/256x256.png b/build/icons/256x256.png new file mode 100644 index 0000000..95dc60b Binary files /dev/null and b/build/icons/256x256.png differ diff --git a/build/icons/32x32.png b/build/icons/32x32.png new file mode 100644 index 0000000..ea7b2df Binary files /dev/null and b/build/icons/32x32.png differ diff --git a/build/icons/48x48.png b/build/icons/48x48.png new file mode 100644 index 0000000..a85fc93 Binary files /dev/null and b/build/icons/48x48.png differ diff --git a/build/icons/512x512.png b/build/icons/512x512.png new file mode 100644 index 0000000..df48e85 Binary files /dev/null and b/build/icons/512x512.png differ diff --git a/build/icons/64x64.png b/build/icons/64x64.png new file mode 100644 index 0000000..87b8273 Binary files /dev/null and b/build/icons/64x64.png differ diff --git a/electron/config/bin.js b/electron/config/bin.js new file mode 100644 index 0000000..52bd537 --- /dev/null +++ b/electron/config/bin.js @@ -0,0 +1,108 @@ +/** + * 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: 18091, + indexPath: 'index.html' + }, + electron: { + directory: './', + cmd: 'electron', + args: ['.', '--env=local', '--color=always'], // --env: local|prod; '--color=always' 控制台颜色 + } + }, + + /** + * 构建 + * ee-bin build + */ + build: { + frontend: { + directory: './frontend', + cmd: 'npm', + args: ['run', 'build'], + } + }, + + /** + * 移动资源 + * ee-bin move + */ + move: { + frontend_dist: { + dist: './frontend/dist', + target: './public/dist' + } + }, + + /** + * 预发布模式(prod) + * ee-bin start + */ + start: { + directory: './', + cmd: 'electron', + args: ['.', '--env=prod'] + }, + + /** + * 加密 + */ + encrypt: { + // confusion - 压缩混淆加密 + // bytecode - 字节码加密 + // strict - 先混淆加密,然后字节码加密 + type: 'confusion', + // 文件匹配 + // ! 符号开头的意思是过滤 + files: [ + 'electron/**/*.(js|json)', + '!electron/config/encrypt.js', + '!electron/config/nodemon.json', + '!electron/config/builder.json', + '!electron/config/bin.json', + ], + // 需要加密的文件后缀,暂时只支持js + fileExt: ['.js'], + // 混淆加密配置 + confusionOptions: { + // 压缩成一行 + compact: true, + // 删除字符串文字并将其放置在一个特殊数组中 + stringArray: true, + // 对stringArray的所有字符串文字进行编码,值:'none' | 'base64' | 'rc4' + stringArrayEncoding: ['none'], + // 注入死代码,注:影响性能 + deadCodeInjection: false, + } + }, + + /** + * 执行自定义命令 + * ee-bin exec + */ + exec: { + node_v: { + directory: './', + cmd: 'node', + args: ['-v'], + }, + npm_v: { + directory: './', + cmd: 'npm', + args: ['-v'], + }, + }, +}; diff --git a/frontend/src/App.vue b/frontend/src/App.vue new file mode 100644 index 0000000..3a7dae8 --- /dev/null +++ b/frontend/src/App.vue @@ -0,0 +1,18 @@ + + + + diff --git a/public/images/example/aw-3.png b/public/images/example/aw-3.png new file mode 100644 index 0000000..ddebf47 Binary files /dev/null and b/public/images/example/aw-3.png differ