electron-builder configuration can be defined
-
in the
package.json
file of your project using thebuild
key on the top level:"build": { "appId": "com.example.app" }
-
or through the
--config <path/to/yml-or-json5-or-toml-or-js>
option. Defaults toelectron-builder.yml
.appId: "com.example.app"
json
, json5, toml orjs
/ts
(exported configuration or function that produces configuration) formats also supported.!!! tip If you want to use
js
file, do not name itelectron-builder.js
. It will conflict withelectron-builder
package name.!!! tip If you want to use toml, please install
yarn add toml --dev
.
Most of the options accept null
— for example, to explicitly set that DMG icon must be default volume icon from the OS and default rules must be not applied (i.e. use application icon as DMG icon), set dmg.icon
to null
.
${ext}
macro is supported in addition to file macros.
Env file electron-builder.env
in the current dir (example). Supported only for CLI usage.
- Name of optional property is normal, required is bold.
- Type is specified after property name:
Array<String> | String
. Union like this means that you can specify or string (**/*
), or array of strings (["**/*", "!foo.js"]
).
{!./app-builder-lib.Interface.CommonConfiguration.md!}
Following options can be set also per platform (top-level keys mac, linux and win) if need.
{!./app-builder-lib.Interface.PlatformSpecificBuildOptions.md!}
Some standard fields should be defined in the package.json
.
{!./app-builder-lib.Interface.Metadata.md!}
To package Proton Native app, set protonNodeVersion
option to current
or specific NodeJS version that you are packaging for.
Currently, only macOS and Linux supported.
CFBundleVersion
(macOS) and FileVersion
(Windows) will be set automatically to version.build_number
on CI server (Travis, AppVeyor, CircleCI and Bamboo supported).
{!./hooks.md!}