electron-egg electron-egg
首页
  • v4.x
  • v3.x
  • v2.x
插件
  • v4.x
  • v3.x
demo
支持
知识点
案例
交流
  • GitHub (opens new window)
  • Gitee (opens new window)
首页
  • v4.x
  • v3.x
  • v2.x
插件
  • v4.x
  • v3.x
demo
支持
知识点
案例
交流
  • GitHub (opens new window)
  • Gitee (opens new window)
❤️成为赞助商
  • 教程

  • ee-bin

    • bin
    • ee-core

    • ee-go

    目录

    bin

    # 介绍

    命令行模块。仅在开发环境使用。

    # 配置文件

    查看教程:开发配置

    ./cmd/bin.js
    

    # API列表

    # dev

    • serve - 'frontend' | 'electron'

    启动模式,frontend 前端;electron 主进程;;为空时,都启动。更多详情见bin配置。

    ee-bin dev
    ee-bin dev --serve=frontend
    ee-bin dev --serve=electron
    

    # build

    构建前端、go、或 自定义命令。更多详情见bin配置。

    ee-bin build --cmds=frontend
    ee-bin build --cmds=go_build_w
    ee-bin build --cmds=go_build_m
    ee-bin build --cmds=go_build_l
    

    # start

    预发布模式(环境变量为:prod),构建可执行程序前,请使用该模式测试程序功能是否正常。

    ee-bin start
    

    # move

    移动前端、go、配置等静态资源到指定目录,供生产环境使用。

    可自定义参数,更多详情见bin配置。

    ee-bin move --flag=frontend_dist
    ee-bin move --flag=go_static,go_config,go_package,go_images
    

    # encrypt

    ee-bin: v1.2.0 新增 读取 cmd/bin.js 配置

    • out - 加密后的输出目录,默认:./public

    将 /public/electron 加密。

    electron目录代码不会被打包,防止源码泄露。

    ee-bin encrypt
    

    # clean

    • dir - 需要删除的目录,默认:./public/electron

    清理加密代码(/public/electron 目录)

    ee-bin clean
    ee-bin clean --dir ./public/electron
    

    # icon

    • -i/-input : 处理的图片路径 (默认:/public/images/logo.png)
    • -o/-output: 输出的路径 (默认:/build/icons/)
    • -s/-size: 需要生成的资源大小 (默认: 16,32,64,256,512)
    • -c : 处理前清空输出路径的 .ico .png 文件
    • -img/-images: win窗口图标/tray 图片生成的路径 (默认:/public/images/)

    其中 -s 图片大小中的 16 处理成 tray.png,32 处理成 logo-32.png

    根据原图一键生成多种尺寸图片,并复制到指定目录。

    # 安装依赖库
    npm install icon-gen -D
    
    # command
    ee-bin icon
    

    注意

    如果安装依赖失败,那么请使用 其它软件

    上次更新: 2025/06/06, 07:21:49
    使用说明
    app

    ← 使用说明 app→

    Theme by Vdoing | Copyright © 2023-2025 哆啦好梦 | 京ICP备15041380号-2
    • 跟随系统
    • 浅色模式
    • 深色模式
    • 阅读模式
    ×