Snap
The top-level snap key contains set of options instructing electron-builder on how it should build Snap.
-
confinement=strict“devmode” | “strict” | “classic” | “undefined” - The type of confinement supported by the snap. -
environmentObject<String, any> | “undefined” - The custom environment. Defaults to{"TMPDIR: "$XDG_RUNTIME_DIR"}. If you set custom, it will be merged with default. -
summaryString | “undefined” - The 78 character long summary. Defaults to productName. -
grade=stable“devel” | “stable” | “undefined” - The quality grade of the snap. It can be eitherdevel(i.e. a development version of the snap, so not to be published to the “stable” or “candidate” channels) or “stable” (i.e. a stable release or release candidate, which can be released to all channels). -
assumesArray<String> | String | “undefined” - The list of features that must be supported by the core in order for this snap to install. -
buildPackagesArray<String> | “undefined” - The list of debian packages needs to be installed for building this snap. -
stagePackagesArray<String> | “undefined” - The list of Ubuntu packages to use that are needed to support theapppart creation. Likedependsfordeb. Defaults to["libnspr4", "libnss3", "libxss1", "libappindicator3-1", "libsecret-1-0"].If list contains
default, it will be replaced to default list, so,["default", "foo"]can be used to add custom packagefooin addition to defaults. -
hooks=build/snap-hooksString | “undefined” - The hooks directory, relative tobuild(build resources directory). -
plugsArray<String | SnapOptions.PlugDescriptor> - The list of plugs. Defaults to["desktop", "desktop-legacy", "home", "x11", "unity7", "browser-support", "network", "gsettings", "audio-playback", "pulseaudio", "opengl"].If list contains
default, it will be replaced to default list, so,["default", "foo"]can be used to add custom plugfooin addition to defaults.Additional attributes can be specified using object instead of just name of plug:
[ { "browser-sandbox": { "interface": "browser-support", "allow-sandbox": true }, }, "another-simple-plug-name" ] -
slotsArray<String | module:app-builder-lib/out/options/SnapOptions.SlotDescriptor> | module:app-builder-lib/out/options/SnapOptions.PlugDescriptor | “undefined” - The list of slots.Additional attributes can be specified using object instead of just name of slot: ``` [ { “mpris”: { “name”: “chromium” }, } ]
In case you want your application to be a compliant MPris player, you will need to definie The mpris slot with “chromium” name. This electron has it hardcoded, and we need to pass this name so snap will allow it in strict confinement.
-
afterArray<String> | “undefined” - Specifies any parts that should be built before this part. Defaults to["desktop-gtk2""].If list contains
default, it will be replaced to default list, so,["default", "foo"]can be used to add custom partsfooin addition to defaults. -
useTemplateAppBoolean - Whether to use template snap. Defaults totrueifstagePackagesnot specified. -
autoStart=falseBoolean - Whether or not the snap should automatically start on login. -
layoutObject<String, any> | “undefined” - Specifies any files to make accessible from locations such as/usr,/var, and/etc. See snap layouts to learn more. -
appPartStageArray<String> | “undefined” - Specifies which files from the app part to stage and which to exclude. Individual files, directories, wildcards, globstars, and exclusions are accepted. See Snapcraft filesets to learn more about the format.The defaults can be found in snap.ts.
-
titleString | “undefined” - An optional title for the snap, may contain uppercase letters and spaces. Defaults toproductName. See snap format documentation.
Inherited from CommonLinuxOptions:
synopsisString | “undefined” - The short description.descriptionString | “undefined” - As description from application package.json, but allows you to specify different for Linux.categoryString | “undefined” - The application category.mimeTypesArray<String> | “undefined” - The mime types in addition to specified in the file associations. Use it if you don’t want to register a new mime type, but reuse existing.desktopany | “undefined” - The Desktop file entries (name to value).executableArgsArray<String> | “undefined” - The executable parameters. Pass to executableName
Inherited from TargetSpecificOptions:
artifactNameString | “undefined” - The artifact file name template.publishThe publish options.