Desktop release npm scripts
Reference for common npm scripts in Pear Electron desktop repos — dev start, lint, package, and per-OS make targets before pear-build.
Pear Electron repositories wrap electron-forge (and on Linux, a small AppImage helper) 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:linux
Packages the app and then runs the scripts/build-app-image.sh helper to produce an AppImage via app-builder-lib. Run on Linux or in CI with a Linux worker:
# package.json
"make:linux": "electron-forge package && ./scripts/build-app-image.sh"Requires jq on the build host; the script reads package.json for the productName, version, description, and registered URL schemes that become the .desktop entry's MimeType.
npm run make:darwin
Runs electron-forge make --platform=darwin on macOS to produce a .app and (with @electron-forge/maker-dmg) a .dmg:
# package.json
"make:darwin": "electron-forge make --platform=darwin"Without code-signing environment variables (MAC_CODESIGN_IDENTITY, APPLE_TEAM_ID, APPLE_ID, APPLE_PASSWORD), the .app runs locally but is quarantined on every other machine. See Build desktop distributables for the signing configuration.
npm run make:win32
Runs electron-forge make --platform=win32 on Windows to produce an .msix:
# package.json
"make:win32": "electron-forge make --platform=win32"Requires the Windows SDK and PowerShell 7+ on the build host. Without WINDOWS_CERTIFICATE_FILE, @electron-forge/maker-msix generates a self-signed development certificate that is cached locally but not portable across machines.
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.