Snap

The top-level snap key contains set of options instructing electron-builder on how it should build Snap.

  • title String - An optional title for the snap, may contain uppercase letters and spaces. Defaults to productName. See snap format documentation.
  • confinement = strict “devmode” | “strict” | “classic” - The type of confinement supported by the snap.
  • environment Object<String, any> - The custom environment. Defaults to {"TMPDIR": "$XDG_RUNTIME_DIR"}. If you set custom, it will be merged with default.
  • summary String - A sentence summarising the snap. Defaults to the productName. Max len. 78 characters, describing the snap in short and simple terms.
  • grade = stable “devel” | “stable” - The quality grade of the snap. It can be either devel (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).
  • assumes Array<String> | String - The list of features that must be supported by the core in order for this snap to install. To learn more, see the Snapcraft docs.
  • buildPackages Array<String> - The list of Debian packages needs to be installed for building this snap.
  • stagePackages Array<String> - The list of Ubuntu packages to use that are needed to support the app part creation. Like depends for deb. Defaults to ["libnspr4", "libnss3", "libxss1", "libappindicator3-1", "libsecret-1-0"].

    If list contains default, it will be replaced with the default list, so, ["default", "foo"] can be used to add a custom package foo in addition to the default list.

  • hooks = build/snap-hooks String - The hooks directory, relative to build (build resources directory).

  • plugs Array<String | SnapOptions.PlugDescriptor> - The list of plugs. Defaults to ["desktop", "desktop-legacy", "home", "x11", "unity7", "browser-support", "network", "gsettings", "pulseaudio", "opengl"].

    If list contains default, it will be replaced with the default list, so, ["default", "foo"] can be used to add a custom plug foo in addition to the default list.

    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" ]

  • after Array<String> - Specifies any parts that should be built before the app part begins its lifecycle. Defaults to ["desktop-gtk2"].

    If list contains default, it will be replaced to default list, so, ["default", "foo"] can be used to add custom parts foo in addition to defaults.

  • useTemplateApp Boolean - Whether to use template snap. Defaults to true if stagePackages not specified.

  • autoStart Boolean - Whether or not the snap should automatically start on login. Defaults to false.

  • appPartStage Array<String> - 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.

  • layout Object<String, any> - Specifies any files to make accessible from locations such as /usr, /var, and /etc. See snap layouts to learn more. Defaults to undefined.

Inherited from CommonLinuxOptions:

  • synopsis String - The short description.
  • description String - As description from application package.json, but allows you to specify different for Linux.
  • category String - The application category.
  • mimeTypes Array<String> - 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.
  • desktop any - The Desktop file entries (name to value).

Inherited from TargetSpecificOptions: