Getting started with electron snap

I thought I’d get started with snap by trying to snap the opsdroid-desktop. However I’ve not done node or electron development before. So I didn’t get very far.

What I did start is at https://github.com/go8ose/opsdroid-desktop/tree/ubuntu-snap. Can someone point me at an existing electron application snap, so I can see if I can get further? I know there is a snap of atom, but I couldn’t find it’s snapcraft.yaml file.

The last electron snap I made was yakyak which I made by simply copy-pasting the yaml from the discord yaml and change the metadata, done. This means I’m not building the electron app itself, but consuming the pre-built app tarball from upstream.

I am trying to snap Signal, which is an electron app though instead of a deb I have its source. My question is, are there guidelines to snap an electron app from source ?

Also is there a way to reduce the size of an electron app ? some kind of platform runtime like we have for GNOME and KDE.

1 Like

Have a look at Electron Builder, it can actually build snaps for you.

When you run it once you can also see the snapcraft.yaml it generated and go from there. It’s a very thin wrapper really, it translates from package.json to snapcraft.yaml and invokes snapcraft on that.