Pear Docs
ReferenceCI & release

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 -- --updates

npm 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 OSTypical 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), .flatpak (pear-electron-forge-maker-flatpak), and .snap (pear-electron-forge-maker-snap)

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; the only other make script is make:mas.

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.

npm run make:mas

Runs electron-forge make --platform=mas to build the Mac App Store package. It runs only on macOS:

# package.json
"make:mas": "electron-forge make --platform=mas"

forge.config.js takes its Mac App Store branch when --platform=mas is on the command line. @electron-forge/maker-pkg then writes out/make/<productName>-<version>-<arch>.pkg. The branch reads MAS_DISTRIBUTION_IDENTITY, MAS_PROVISIONING_PROFILE, and MAS_INSTALLER_DISTRIBUTION_IDENTITY—see Mac App Store.

Where to go next

Last updated on

Was this helpful?

On this page