electron-builder configuration file
electron-build configuration file
electron-builder.json
Validate
Check your file against this schema
Opens the validator with this schema already loaded. Paste your
electron-builder.json and it validates in your browser — nothing is uploaded.
Reference
Fields
Generated directly from the schema, following local
$refs, to two levels of nesting.
| Field | Type | Description |
|---|---|---|
$schema | null | string | JSON Schema for this document. |
afterAllArtifactBuild | anyOf | The function (or path to file or module id) to be [run after all artifacts are build](#afterAllArtifactBuild). |
afterPack | anyOf | The function (or path to file or module id) to be [run after pack](#afterpack) (but before pack into distributable format and sign). |
afterSign | anyOf | The function (or path to file or module id) to be [run after pack and sign](#aftersign) (but before pack into distributable format). |
apk | anyOf | — |
appId | null | string | The application id. Used as [CFBundleIdentifier](https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/20001431-102070) for MacOS and as default: "com.electron.${name}" |
appImage | anyOf | AppImage options. |
appx | anyOf | — |
artifactBuildCompleted | anyOf | The function (or path to file or module id) to be run on artifact build completed. |
artifactBuildStarted | anyOf | The function (or path to file or module id) to be run on artifact build start. |
artifactName | null | string | The [artifact file name template](/configuration/configuration#artifact-file-name-template). Defaults to `${productName}-${version}.${ext}` (some target can have other defaults, see corresponding options). |
asar | anyOf | Whether to package the application's source code into an archive, using [Electron's archive format](http://electron.atom.io/docs/tutorial/application-packaging/). Node modules, that must be unpacked, will be detected automatically, you default: true |
asarUnpack | anyOf | A [glob patterns](/file-patterns) relative to the [app directory](#MetadataDirectories-app), which specifies which files to unpack when creating the [asar](http://electron.atom.io/docs/tutorial/application-packaging/) archive. |
beforeBuild | anyOf | The function (or path to file or module id) to be run before dependencies are installed or rebuilt. Works when `npmRebuild` is set to `true`. Resolving to `false` will skip dependencies install or rebuild. If provided and `node_modules` |
buildDependenciesFromSource | boolean | Whether to build the application native dependencies from source. default: false |
buildVersion | null | string | The build version. Maps to the `CFBundleVersion` on macOS, and `FileVersion` metadata property on Windows. Defaults to the `version`. If `TRAVIS_BUILD_NUMBER` or `APPVEYOR_BUILD_NUMBER` or `CIRCLE_BUILD_NUM` or `BUILD_NUMBER` or |
compression | anyOf | The compression level. If you want to rapidly test build, `store` can reduce build time significantly. `maximum` doesn't lead to noticeable size difference, but increase build time. default: "normal" |
copyright | null | string | The human-readable copyright line for the app. default: "Copyright © year ${author}" |
cscKeyPassword | null | string | — |
cscLink | null | string | — |
deb | anyOf | Debian package options. |
detectUpdateChannel | boolean | Whether to infer update channel from application version pre-release components. e.g. if version `0.12.1-alpha.1`, channel will be set to `alpha`. Otherwise to `latest`. default: true |
directories | anyOf | — |
dmg | anyOf | macOS DMG options. |
electronCompile | boolean | Whether to use [electron-compile](http://github.com/electron/electron-compile) to compile app. Defaults to `true` if `electron-compile` in the dependencies. And `false` if in the `devDependencies` or doesn't specified. |
electronDist | string | The path to custom Electron build (e.g. `~/electron/out/R`). |
electronDownload | object | — |
electronDownload.arch | string | — |
electronDownload.cache | null | string | The [cache location](https://github.com/electron-userland/electron-download#cache-location). |
electronDownload.customDir | null | string | — |
electronDownload.customFilename | null | string | — |
electronDownload.isVerifyChecksum | boolean | — |
electronDownload.mirror | null | string | The mirror. |
electronDownload.platform | string | — one of: "darwin", "linux", "mas", "win32" |
electronDownload.strictSSL | boolean | — |
electronDownload.version | string | — |
electronUpdaterCompatibility | null | string | The [electron-updater compatibility](/auto-update#compatibility) semver range. |
electronVersion | null | string | The version of electron you are packaging for. Defaults to version of `electron`, `electron-prebuilt` or `electron-prebuilt-compile` dependency. |
extends | null | string | The name of a built-in configuration preset or path to config file (relative to project dir). Currently, only `react-cra` is supported. If `react-scripts` in the app dependencies, `react-cra` will be set automatically. Set to `null` to |
extraFiles | anyOf | — |
extraMetadata | any | Inject properties to `package.json`. |
extraResources | anyOf | — |
fileAssociations | anyOf | The file associations. |
files | anyOf | — |
forceCodeSigning | boolean | Whether to fail if app will be not code signed. |
framework | null | string | The framework name. One of `electron`, `proton-native`, `libui`. Defaults to `electron`. |
freebsd | anyOf | — |
generateUpdatesFilesForAllChannels | boolean | Please see [Building and Releasing using Channels](https://github.com/electron-userland/electron-builder/issues/1182#issuecomment-324947139). default: false |
icon | null | string | — |
includePdb | boolean | Whether to include PDB files. default: false |
launchUiVersion | null | string | boolean | *libui-based frameworks only* The version of LaunchUI you are packaging for. Applicable for Windows only. Defaults to version suitable for used framework version. |
linux | anyOf | Options related to how build Linux targets. |
mac | anyOf | Options related to how build macOS targets. |
mas | anyOf | MAS (Mac Application Store) options. |
msi | anyOf | — |
muonVersion | null | string | The version of muon you are packaging for. |
nodeGypRebuild | boolean | Whether to execute `node-gyp rebuild` before starting to package the app. Don't [use](https://github.com/electron-userland/electron-builder/issues/683#issuecomment-241214075) default: false |
nodeVersion | null | string | *libui-based frameworks only* The version of NodeJS you are packaging for. You can set it to `current` to set the Node.js version that you use to run. |
npmArgs | anyOf | Additional command line arguments to use when installing app native deps. |
npmRebuild | boolean | Whether to [rebuild](https://docs.npmjs.com/cli/rebuild) native dependencies before starting to package the app. default: true |
npmSkipBuildFromSource | boolean | — |
nsis | anyOf | — |
nsisWeb | anyOf | — |
onNodeModuleFile | anyOf | The function (or path to file or module id) to be [run on each node module](#onnodemodulefile) file. |
p5p | anyOf | — |
pacman | anyOf | — |
pkg | anyOf | macOS PKG options. |
portable | anyOf | — |
productName | null | string | As [name](#Metadata-name), but allows you to specify a product name for your executable which contains spaces and other special characters not allowed in the [name property](https://docs.npmjs.com/files/package.json#name). |
protocols | anyOf | The URL protocol schemes. |
protonNodeVersion | null | string | — |
publish | anyOf | — |
readonly | boolean | Whether to fail if the application is not signed (to prevent unsigned app if code signing configuration is not correct). default: false |
releaseInfo | object | — |
releaseInfo.releaseDate | string | The release date. |
releaseInfo.releaseName | null | string | The release name. |
releaseInfo.releaseNotes | null | string | The release notes. |
releaseInfo.releaseNotesFile | null | string | The path to release notes file. Defaults to `release-notes-${platform}.md` (where `platform` it is current platform — `mac`, `linux` or `windows`) or `release-notes.md` in the [build resources](#MetadataDirectories-buildResources). |
remoteBuild | boolean | Whether to build using Electron Build Service if target not supported on current OS. default: true |
removePackageScripts | boolean | Whether to remove `scripts` field from `package.json` files. default: true |
rpm | anyOf | — |
snap | anyOf | Snap options. |
squirrelWindows | anyOf | — |
target | anyOf | — |
win | anyOf | Options related to how build Windows targets. |
Audit
What we found in this schema
- Declared draft: draft-07
- Validates cleanly against its own meta-schema.
- Uses non-standard keywords that generic validators ignore:
annotations. - 515 properties, 80% carrying a description, max nesting depth 10.
Standards
Specification sections for the keywords in this schema
| Keyword | Document | Section |
|---|---|---|
$ref | JSON Schema Core, draft 2020-12 | §8.2.3.1 — Direct References with "$ref" |
additionalProperties | JSON Schema Core, draft 2020-12 | §10.3.2.3 — "additionalProperties" |
anyOf | JSON Schema Core, draft 2020-12 | §10.2.1.2 — "anyOf" |
default | JSON Schema Validation, draft 2020-12 | §9.2 — "default" |
description | JSON Schema Validation, draft 2020-12 | §9.1 — "title" and "description" |
enum | JSON Schema Validation, draft 2020-12 | §6.1.2 — "enum" |
items | JSON Schema Core, draft 2020-12 | §10.3.1.2 — "items" |
properties | JSON Schema Core, draft 2020-12 | §10.3.2.1 — "properties" |
required | JSON Schema Validation, draft 2020-12 | §6.5.3 — "required" |
type | JSON Schema Validation, draft 2020-12 | §6.1.1 — "type" |
Documents
- JSON Schema Core, draft 2020-12 — JSON Schema: A Media Type for Describing JSON Documents, A. Wright, H. Andrews, B. Hutton, G. Dennis, Eds., 2022. draft-bhutton-json-schema-01. An expired Internet-Draft with no formal standing in the IETF standards process; it is nonetheless the specification of record for JSON Schema 2020-12, published by json-schema.org.
- JSON Schema Validation, draft 2020-12 — JSON Schema Validation: A Vocabulary for Structural Validation of JSON, A. Wright, H. Andrews, B. Hutton, Eds., 2022.
- RFC 8259 (STD 90) — The JavaScript Object Notation (JSON) Data Interchange Format, T. Bray, Ed., 2017. The format a schema describes.
- RFC 6901 — JavaScript Object Notation (JSON) Pointer. Defines the pointer syntax used by $ref fragments and the ~0 / ~1 escapes.
Source
Attribution
This schema comes from SchemaStore, distributed under the Apache License 2.0. Copyright 2015–present Mads Kristensen and contributors. View the original file. The field table and audit on this page are generated by JSONTools.tools; the schema itself is unmodified.