| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112 |
- /**
- * 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", "--color=always"],
- },
- },
- /**
- * 构建
- * ee-bin build
- */
- build: {
- frontend: {
- directory: "./frontend",
- cmd: "npm",
- args: ["run", "build"],
- },
- python: {
- directory: "./python",
- cmd: "python",
- args: ["./setup.py", "build"],
- },
- },
- /**
- * 移动资源
- * ee-bin move
- */
- move: {
- frontend_dist: {
- dist: "./frontend/dist",
- target: "./public/dist",
- },
- python_dist: {
- dist: "./python/dist",
- target: "./build/extraResources/py",
- },
- },
- /**
- * 预发布模式(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,
- },
- },
- /**
- * 执行自定义命令
- * ee-bin exec
- */
- exec: {
- node_v: {
- directory: "./",
- cmd: "node",
- args: ["-v"],
- },
- npm_v: {
- directory: "./",
- cmd: "npm",
- args: ["-v"],
- },
- python: {
- directory: "./python",
- cmd: ".venv/Scripts/python",
- args: ["./main.py", "--port=7074"],
- stdio: "inherit", // ignore
- },
- },
- };
|