{"id":15007512,"url":"https://github.com/davidwinter/electron-forge-maker-snap","last_synced_at":"2025-10-03T16:31:30.288Z","repository":{"id":38385779,"uuid":"318178579","full_name":"davidwinter/electron-forge-maker-snap","owner":"davidwinter","description":"Simple snap packaging for electron-forge that just works","archived":true,"fork":false,"pushed_at":"2022-06-05T11:41:24.000Z","size":422,"stargazers_count":4,"open_issues_count":6,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-12-16T23:22:57.474Z","etag":null,"topics":["electron","electron-forge","linux-distribution","snap","snap-store","snapcraft"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/davidwinter.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["davidwinter"]}},"created_at":"2020-12-03T11:59:08.000Z","updated_at":"2023-01-28T00:13:45.000Z","dependencies_parsed_at":"2022-08-20T22:10:57.487Z","dependency_job_id":null,"html_url":"https://github.com/davidwinter/electron-forge-maker-snap","commit_stats":null,"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidwinter%2Felectron-forge-maker-snap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidwinter%2Felectron-forge-maker-snap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidwinter%2Felectron-forge-maker-snap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidwinter%2Felectron-forge-maker-snap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davidwinter","download_url":"https://codeload.github.com/davidwinter/electron-forge-maker-snap/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235155964,"owners_count":18944822,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["electron","electron-forge","linux-distribution","snap","snap-store","snapcraft"],"created_at":"2024-09-24T19:10:33.535Z","updated_at":"2025-10-03T16:31:24.946Z","avatar_url":"https://github.com/davidwinter.png","language":"JavaScript","funding_links":["https://github.com/sponsors/davidwinter"],"categories":[],"sub_categories":[],"readme":"# @davidwinter/electron-forge-maker-snap\n\n[![test](https://github.com/davidwinter/electron-forge-maker-snap/workflows/test/badge.svg)](https://github.com/davidwinter/electron-forge-maker-snap/actions?query=workflow%3Atest) [![Codecov](https://img.shields.io/codecov/c/github/davidwinter/electron-forge-maker-snap)](https://codecov.io/gh/davidwinter/electron-forge-maker-snap) [![npm (scoped)](https://img.shields.io/npm/v/@davidwinter/electron-forge-maker-snap)](https://www.npmjs.com/package/@davidwinter/electron-forge-maker-snap) [![npm](https://img.shields.io/npm/dw/@davidwinter/electron-forge-maker-snap)](https://www.npmjs.com/package/@davidwinter/electron-forge-maker-snap)\n\n\u003e Simple snap packaging for `electron-forge` that just works\n\n## Prerequisites\n\n- Ensure that `snapcraft` is [installed](https://snapcraft.io/docs/installing-snapcraft) via `snap` (the `.deb` version of `snap` is now deprecated)\n\n## Installation\n\n```sh\nyarn add @davidwinter/electron-forge-maker-snap --dev\n```\n\nor\n\n```sh\nnpm install @davidwinter/electron-forge-maker-snap --dev\n```\n\n## Usage\n\nYou can read more about [Makers config on the electron-forge website](https://www.electronforge.io/config/makers), but essentially the config required is:\n\n```js\n{\n\tname: '@davidwinter/electron-forge-maker-snap',\n\tconfig: {\n\t\tcategories: ['Utility']\n\t\t// See below for more configuration options\n\t}\n}\n```\n\nThen make your snap package:\n\n```\nelectron-forge make --target=\"@davidwinter/electron-forge-maker-snap\"\n```\n\nOnce completed, the snap package will be located at: `out/make` with a filename like `{executable}-{version}.snap`, for example, `out/make/nimblenote-2.0.3.snap`.\n\n### Using with CI\n\nWhen using this maker with CI, such as GitHub Actions, CircleCI etc, it is best practice to tell `snapcraft` to build snaps in the `host` build environment. To do this, set the environment variable `SNAP_BUILD_ENVIRONMENT=host`.\n\nAn example that works with GitHub Actions:\n\n```yml\n- name: Install snapcraft\n  run: sudo snap install snapcraft --classic\n\n- name: Build snap package\n  run: yarn make\n  env:\n    SNAPCRAFT_BUILD_ENVIRONMENT: host\n\n- name: Upload snap artifact\n  uses: actions/upload-artifact@v2\n  with:\n    path: out/make/*.snap\n```\n\n### Debugging\n\nRun with `DEBUG='electron-forge-maker-snap:*,electron-forge:lifecycle'` for debug output from `snapcraft`:\n\n```sh\nDEBUG='electron-forge-maker-snap:*,electron-forge:lifecycle' electron-forge make --target=\"@davidwinter/electron-forge-maker-snap\"\n```\n\nAppending the `,electron-forge:lifecycle` debug namespace above is required in order to see this makers debug output. Otherwise by default, during the `electron-forge` output, any other `debug` messages are suppressed so that it doesn't interfere with the CLI interface. Adding this additional namespace acts as a flag to enable the debug output in a safe way.\n\n## Configuration\n\nThe maker will try and figure out a bunch of sensible defaults for your config, but the following values can be overridden.\n\n### applicationName\n\n**Type:** `string`\\\n**Default:** From the derived `appName` value from the `electron-forge` configuration.\n\nMaximum length of 40 characters.\n\nThis is the human friendly name of the application, also the `title` that will be used for the Snapstore and `.desktop` integration with Linux distributions.\n\n**Example:** `Acme Notes 3`\n\n### executableName\n\n**Type:** `string`\\\n**Default:** A sanatised version of `applicationName` with invalid characters removed and spaces replaced with dashes.\n\nCan only contain letters in lower case, numbers, and hyphens, and it can’t start or end with a hyphen. Automatic sanitation will be applied.\n\n**Example:** `acme-notes-3`\n\n### confinement\n\n**Type:** `string`\\\n**Default:** `strict`\n\nThe snap confinement can be either `strict`, `devmode` or `classic`.\n\n### grade\n\n**Type:** `string`\\\n**Default:** `stable`\n\nThe snap grade can be either `stable` or `devel`.\n\n### summary\n\n**Type:** `string`\\\n**Default:** Derived from `description` within `package.json`.\n\nMaximum length of 78 characters.\n\nThis is used by the Snap Store as the application summary and is mandatory.\n\n**Example:** `Write your best notes with Acme Notes v3!`\n\n### description\n\n**Type:** `string`\\\n**Default:** Derived from `description` within `package.json`.\n\nThis can be a multi-line description of the application and is used by the Snap Store.\n\n### license\n\n**Type:** `string`\\\n**Default:** Derived from `license` within `package.json`.\n\nA license for the snap in the form of an SPDX expression for the license.\n\n**Example:** `MIT`\n\n### icon\n\n**Type:** `string`\\\n**Default:** Derived from `icon` within your `electron-forge` `packagerConfig`, appending a `.png` extension if required.\n\nThe application icon used within the Snap Store and also with the Linux distribution desktop integration via the `.desktop` file - what appears in menus and docks.\n\n**Example:** `./build/icon.png`\n\n### categories\n\n**Type:** `array` of `string`\\\n**Default:** `[]`\n\nThese categories define which menus the application belongs to on a Linux distribution. See: https://specifications.freedesktop.org/menu-spec/latest/apa.html#main-category-registry\n\n**Example:** `['Utility', 'Development']`\n\n### stagePackages\n\n**Type:** `array` of `string`\\\n**Default:** `['libnss3', 'libnspr4', 'libasound2', 'libgconf2-4', 'libnotify4', 'libpcre3', 'libpulse0', 'libxss1', 'libxtst6']`\n\nList of additional packages required to support creationg of the app. If you want to add packages in addition to the default, add an item named `default`, for example: `['default', 'libxfixes3']`.\n\n### plugs\n\n**Type:** `array` of `string`\\\n**Default:** `['alsa', 'browser-support', 'desktop', 'desktop-legacy', 'gsettings', 'home', 'network', 'opengl', 'pulseaudio', 'unity7', 'wayland', 'x11']`\n\nList of additional plugs to include in the snap. If you want to add plugs in addition to the default, add an item named `default`, for example: `['default', 'media-hub']` to add the `media-hub` plug in addition to all of the defaults.\n\n### layout\n\n**Type:** `object`\n\nSee [Snap layouts](https://snapcraft.io/docs/snap-layouts). Define in the same format described on that page.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidwinter%2Felectron-forge-maker-snap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidwinter%2Felectron-forge-maker-snap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidwinter%2Felectron-forge-maker-snap/lists"}