pear-electron-forge-maker-snap
v1.0.0
Published
repo-template
Readme
pear-electron-forge-maker-snap
An Electron Forge maker for building Linux Snap packages.
This maker generates a snapcraft.yaml automatically from your Electron Forge configuration, while still allowing deep customization via structured overrides.
Usage
npm install pear-electron-forge-maker-snap --save-devforge.config.js
makers: [
{
name: 'pear-electron-forge-maker-snap',
platforms: ['linux'],
config: {
icon: 'build-assets/linux/assets/Keet/Keet-256x256.png'
snapcraft: {
// Global snapcraft fields (optional overrides)
summary: 'Experience secure, private messaging and file sharing without intermediaries',
description:
'Discover https://Keet.io, the ultimate decentralized, peer-to-peer communication platform. Enjoy secure, private, and efficient messaging and file sharing without intermediaries. Experience true digital privacy and freedom with https://Keet.io',
contact: '[email protected]',
license: 'Apache-2.0',
issues: 'https://support.keet.io/technical-support-and-troubleshooting/submit-a-report',
website: 'https://keet.io',
// App-level overrides merged into apps[snapName]
app: {
plugs: [
'network',
'home'
],
environment: {
TMPDIR: '$XDG_RUNTIME_DIR'
}
},
// Part-level overrides merged into parts[snapName]
part: {
'stage-packages': ['libatomic1']
}
// Raw can fully override the final generated config
raw: {
base: 'core26'
}
}
}
}
]Automatically generated values
The following fields are always generated by the maker and will override user input:
name(derived from app name)version(from package.json)base(default: core24, unless overridden via raw)icon(copied into snap assets)apps[snapName].commandapps[snapName].desktopparts[snapName].plugin(alwaysdump)parts[snapName].source
Configuration priority
Configuration is applied in the following order:
- Base defaults (internal)
- User
snapcraftconfig (app,part, ... rest ...) - Internal computed overrides (name, command, plugin, etc.)
snapcraft.raw(final override, highest priority)
License
Apache-2.0
