You can pass options to the packager by either putting configuration into ember-electron/electron-forge-config.js
, or by passing a command line parameter to the ember electron:package
command. In the case that an option is defined both on the command line and in the electron-forge-config.js
, the command line option will be used.
⚠️ Theelectron-forge-config.js
file will be copied to a temporary folder during compilation, meaning that relative paths will be different. If you require resources from other folders (for intsance using arequire('../myscript')
, please do keep in mind thatelectron-forge-config.js
.
-
--app-copyright
- String The human-readable copyright line for the app. Maps to the LegalCopyright metadata property on Windows, and NSHumanReadableCopyright on OS X. -
--app-version
- String The release version of the application. Maps to theProductVersion
metadata property on Windows, andCFBundleShortVersionString
on OS X. -
--arch
- String Allowed values: ia32, x64, all -
--asar
- Boolean Whether to package the application's source code into an archive, using Electron's archive format. Reasons why you may want to enable this feature are described in an application packaging tutorial in Electron's documentation. Defaults tofalse
.ordering
- String: A path to an ordering file for packing files. An explanation can be found on the Atom issue tracker.unpack
- String: A glob expression, when specified, unpacks the file with matching names to theapp.asar.unpacked
directory.unpackDir
- String: Unpacks the dir to theapp.asar.unpacked
directory whose names exactly or pattern match this string. Theasar.unpackDir
is relative todir
.
For example,
asar-unpack-dir=sub_dir
will unpack the directory/<dir>/sub_dir
. -
--build-version
- String The build version of the application. Maps to theFileVersion
metadata property on Windows, andCFBundleVersion
on OS X. -
--copy-dev-modules
- Boolean Copy dependency node modules from local dev node_modules instead of installing them. -
--defer-symlinks
- Boolean Whether symlinks should be dereferenced during copying (defaults to true) -
--download
- Object If present, passes custom options toelectron-download
(see the link for more detailed option descriptions and the defaults).cache
String: The directory where prebuilt, pre-packaged Electron downloads are cached.mirror
String: The URL to override the default Electron download location.strictSSL
Boolean: Whether SSL certificates are required to be valid when downloading Electron.
-
--dir
- String The source directory -
--icon
- String Currently you must look for conversion tools in order to supply an icon in the format required by the platform. If the file extension is omitted, it is auto-completed to the correct extension based on the platform.- OS X:
.icns
- Windows:
.ico
(See below for details on non-Windows platforms) - Linux: this option is not required, as the dock/window list icon is set via the icon option in the BrowserWindow contructor. Setting the icon in the file manager is not currently supported.
- OS X:
-
--ignore
- RegExp A pattern which specifies which files to ignore when copying files to create the package(s). Take note that Ember Electron creates a temp folder containingelectron.js
,package.json
, and Ember Cli'sdist
output folder. Glob patterns will not work. -
--name
- String The application name. -
--out
- String The directory where electron builds are saved. Defaults toelectron-builds/
. -
--overwrite
- Boolean Whether to replace an already existing output directory for a given platform (true
) or skip recreating it (false
). Defaults tofalse
. -
--platform
- String Target platform for build outputs. Allowed values: linux, win32, darwin, mas, all -
--prune
- Boolean Runsnpm prune --production
before starting to package the app. -
--version
- String Electron version (without the 'v') - for example,0.33.9
, see Electron releases for valid versions
-
--app-bundle-id
- String The bundle identifier to use in the application's plist -
--app-category-type
- String The application category type, as shown in the Finder via View -> Arrange by Application Category when viewing the Applications directory. For example,app-category-type=public.app-category.developer-tools
will set the application category to Developer Tools. Valid values are listed in Apple's documentation. -
--extend-info
- String Filename of a plist file; the contents are added to the app's plist. Entries inextend-info
override entries in the base plist file supplied by electron-prebuilt, but are overridden by other explicit arguments such asapp-version
orapp-bundle-id
. -
--extra-resource
- String Filename of a file to be copied directly into the app's Contents/Resources directory. -
--helper-bundle-id
- String The bundle identifier to use in the application helper's plist. -
--osx-sign
- Object If present, signs OS X target apps when the host platform is OS X and XCode is installed. When the value is true, pass default configuration to the signing module. The configuration values listed below can be customized when the value is an Object. See electron-osx-sign for more detailed option descriptions and the defaults.identity
- String: The identity used when signing the package via codesign.entitlements
- String: The path to the 'parent' entitlements.entitlements-inherit
- String: The path to the 'child' entitlements.
-
--protocol
- Array of strings The URL protocol scheme(s) to associate the app with. For example, specifyingmyapp
would cause URLs such asmyapp://path
to be opened with the app. Maps to theCFBundleURLSchemes
metadata property. This option requires a correspondingprotocol-name
option to be specified. -
--protocol-name
- Strings The descriptive name of the URL protocol scheme(s) specified via theprotocol
option. Maps to theCFBundleURLName
metadata property.
Note: Windows builds on non-Windows platforms require Wine to be available on your PATH before the build/package step is executed.
-
--win32metadata
- Object Object hash of application metadata to embed into the executable (Windows only):CompanyName
- StringLegalCopyright
- StringFileDescription
- StringOriginalFilename
- StringProductName
- StringInternalName
- String