Desktop release npm scripts
Reference for common npm scripts in Pear Electron desktop repos — dev start, lint, package, and make targets before pear-build.
Pear Electron repositories wrap electron-forge behind package.json scripts so day-to-day work stays predictable. This page lists the script names used by hello-pear-electron — the template every snippet in Ship your app and Deploy over-the-air updates is built from. Your project may rename them; read package.json locally.
npm start
Starts the app in development mode with OTA disabled, so a seeded pear:// link does not replace your working tree while you hack:
# package.json
"start": "electron-forge start -- --no-updates"To exercise the OTA path locally, drop the flag with an explicit --updates:
npm start -- --updatesnpm run lint / npm run format
Run Prettier and the project's linter (lunte in the template):
# package.json
"lint": "prettier --check . && lunte",
"format": "prettier --write . && lunte --fix"Exact tools vary — inspect scripts in your repo.
npm run package
Runs electron-forge package to produce a packaged app without the per-OS distributables (no .app/.msix/.AppImage). Useful for a quick smoke test:
# package.json
"package": "electron-forge package"npm run make
Runs electron-forge make and produces platform-native installers for the current host OS, as defined in forge.config.js:
# package.json
"make": "electron-forge make"| Host OS | Typical outputs (template makers) |
|---|---|
| macOS | .app (packager) + .dmg (@electron-forge/maker-dmg) |
| Windows | .msix (@electron-forge/maker-msix) under out/<AppName>-win32-<arch>/ |
| Linux | .AppImage (pear-electron-forge-maker-appimage), plus Flatpak and Snap when configured |
Run npm run make on each OS (or CI worker) you need before pear-build. There are no separate make:darwin / make:linux / make:win32 scripts in the current template.
Unsigned local builds are fine on the machine that made them; production paths need vendor signing — see Build desktop distributables for MAC_CODESIGN_IDENTITY, KEYCHAIN_PROFILE, and WINDOWS_SIGN_HOOK.
Where to go next
- Build desktop distributables — signing, notarization, MSIX publisher, and the
pear-builddeployment directory layout. - Deploy your application — stage, provision, and multisig once the deployment directory exists.
- Getting started — part 3 (ship) and part 4 (update) — type-along walkthrough of the whole flow.
- Release pipeline — how the scripts above feed into trust boundaries and release lines.