Options
All
  • Public
  • Public/Protected
  • All
Menu

Any options that aren't specified here are passed through to the snapcraft.yaml file via SnapcraftConfig.

Hierarchy

  • Options

Index

Properties

appConfig?: Record<string, unknown>

Additional app-specific Snapcraft configuration for the Electron app. This is different from SnapcraftConfig in that it is scoped under apps.<app-name>.

appPlugs?: string[]

Additional plugs for the Electron app, which are necessary for the app to be a consumer of a feature in the system. Common features can be set via the features option. To set any attributes for the plugs, set them in the plugs option.

For example, if the app uses a DBus interface:

{
appPlugs: ['my-dbus-interface'],
plugs: {
'my-dbus-interface': {
interface: 'dbus',
name: 'com.example.my-interface',
bus: 'session'
}
}
}

plugs will be passed through directly to the generated snapcraft.yaml.

appSlots?: string[]

Additional slots for the Electron app, which are necessary for the app to be a producer of a feature in the system. Common features can be set via the features option. To set any attributes for the plugs, set them in the slots option.

For example, if the app creates a DBus interface:

{
appSlots: ['my-dbus-interface'],
slots: {
'my-dbus-interface': {
interface: 'dbus',
name: 'com.example.my-interface',
bus: 'session'
}
}
}

slots will be passed through directly to the generated snapcraft.yaml.

arch?: string

Either the Node.js-formatted arch or Snap-formatted arch, used to specify the Snap's target arch.

Default: the host arch, via process.arch.

confinement?: "strict" | "devmode" | "classic"

Default: devmode

description?: string

The longer description for the snap. Can contain newlines.

desktopTemplate?: string

The absolute path to a custom Freedesktop.org desktop file template.

dest?: string

The directory where the .snap file is created.

Default: the current working directory.

executableName?: string

The executable name of the Electron app, sans file extension. Corresponds to the executableName option in Electron Packager.

Default: either productName or name in package.json

features?: { alsa?: true; audio?: true; browserSandbox?: false; mpris?: string; passwords?: true; webgl?: true }

Describes what functionality the Electron app needs, in order to work inside the Snap sandbox.

Example:

{
features: {
audio: true,
mpris: 'com.example.mpris',
webgl: true
}
}

Setting a feature to a false-y value does not disable the feature, only omitting the feature from the Object does that.

Type declaration

  • Optional alsa?: true

    Audio support via ALSA (replaces audio support if both are specified)

  • Optional audio?: true

    Audio support via PulseAudio.

  • Optional browserSandbox?: false

    Web browser functionality. This was originally enabled by default when using Electron ≥ 5.0.0, due to the setuid sandbox support. However, Snapcraft allows for use of the snap confined sandbox, particularly within strict confinement. We should encourage but not enforce the browser-sandbox plug.

  • Optional mpris?: string

    MPRIS support.

    If enabled, the interface name must be specified as the feature value.

  • Optional passwords?: true

    Access the secret service (e.g., GNOME Keyring)

  • Optional webgl?: true

    WebGL support (requires Mesa, etc.)

grade?: "devel" | "stable"

The quality grade of the Snap. See the Snapcraft documentation for valid values.

Default: devel

hookScripts?: Record<string, string>

One or more hook scripts to be installed with the Snap. The format of the Object is { hookName: pathToHookScript, […] }. Hook names can be found in the Snapcraft documentation.

name?: string

The name of the Snap package.

Default: name in package.json

plugs?: Record<string, Record<string, unknown>>

See appPlugs for details.

slots?: Record<string, Record<string, unknown>>

See appSlots for details.

snapcraft?: string

The absolute path to the snapcraft executable.

By default, it searches paths in the PATH environment variable.

src: string
summary?: string

A 78 character long summary for the Snap.

Default: description in package.json

version?: string

The version of the Snap package.

Default: version in package.json