{"name":"@electron/packager","version":"18.4.4","keywords":["electron","packager","bundler","app"],"author":{"name":"Mark Lee"},"license":"BSD-2-Clause","_id":"@electron/packager@18.4.4","maintainers":[{"name":"electron-cfa","email":"info+cfa-npm@electronjs.org"}],"homepage":"https://github.com/electron/packager","bugs":{"url":"https://github.com/electron/packager/issues"},"ava":{"timeout":"120s"},"bin":{"electron-packager":"bin/electron-packager.js"},"dist":{"shasum":"708458f73639c2aa919ce5f6250ac519fa53ee5c","tarball":"http://registry-npm.ywwl.com/@electron/packager/download/@electron/packager-18.4.4.tgz","fileCount":66,"integrity":"sha512-fTUCmgL25WXTcFpM1M72VmFP8w3E4d+KNzWxmTDRpvwkfn/S206MAtM2cy0GF78KS9AwASMOUmlOIzCHeNxcGQ==","signatures":[{"sig":"MEYCIQC4PqnLEilBQsGSaQqfjcUazkcOJFiz9r/XJ/qB9VdkIQIhAKncUPs+wPIY2uREAiiQ3XQR7VlucCVVOmVzcMQBGWUY","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@electron%2fpackager@18.4.4","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":235452,"size":57508,"noattachment":false,"key":"/@electron/packager/-/@electron/packager-18.4.4.tgz"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">= 16.13.0"},"funding":{"url":"https://github.com/electron/packager?sponsor=1"},"gitHead":"579f74209bd106c0470234aecaaabb553efd6d17","scripts":{"ava":"ava test/index.js","lint":"prettier --check \"*.{ts,js,json}\" && eslint . --cache","test":"npm run lint && npm run coverage","build":"tsc","prepare":"husky install","pretest":"npm run build","coverage":"nyc ava test/index.js","postbuild":"copyfiles -f ./temp/targets.js ./src","build:docs":"npx typedoc","prepublish":"npm run build","coverage:report":"nyc report --reporter=text-lcov > coverage.lcov"},"_npmUser":{"name":"electron-cfa","email":"info+cfa-npm@electronjs.org"},"repository":{"url":"git+https://github.com/electron/packager.git","type":"git"},"_npmVersion":"10.8.2","description":"Customize and package your Electron app with OS-specific bundles (.app, .exe, etc.) via JS or CLI","directories":{"test":"test"},"lint-staged":{"*.{json}":"prettier --write","*.{js,ts}":["prettier --write","eslint --fix"]},"resolutions":{"got":"11.8.5"},"_nodeVersion":"20.19.4","dependencies":{"junk":"^3.1.0","debug":"^4.0.1","plist":"^3.0.0","semver":"^7.1.3","resedit":"^2.0.0","resolve":"^1.1.6","fs-extra":"^11.1.0","galactus":"^1.0.0","prettier":"^3.4.2","filenamify":"^4.1.0","extract-zip":"^2.0.0","parse-author":"^2.0.0","yargs-parser":"^21.1.1","@electron/get":"^3.0.0","@electron/asar":"^3.2.13","get-package-info":"^1.0.0","@electron/notarize":"^2.1.0","@electron/osx-sign":"^1.0.5","@electron/universal":"^2.0.1","@electron/windows-sign":"^1.0.0","@malept/cross-spawn-promise":"^2.0.0"},"publishConfig":{"provenance":true},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.10.1","nyc":"^15.0.0","husky":"^8.0.3","sinon":"^18.0.0","eslint":"^8.52.0","lodash":"^4.17.21","pkg-up":"^4.0.0","typedoc":"~0.25.4","copyfiles":"^2.4.1","typescript":"^5.2.2","@types/node":"^16.0.0","lint-staged":"^12.1.7","@types/debug":"^4.1.10","@types/plist":"^3.0.4","buffer-equal":"^1.0.0","@types/semver":"^7.5.8","@types/resolve":"^1.20.4","@types/fs-extra":"^11.0.3","eslint-plugin-ava":"^14.0.0","eslint-plugin-node":"^11.0.0","@types/parse-author":"^2.0.2","@types/yargs-parser":"^21.0.2","eslint-plugin-import":"^2.22.1","eslint-plugin-promise":"^6.2.0","eslint-config-prettier":"^10.0.1","@typescript-eslint/parser":"^6.9.1","@typescript-eslint/eslint-plugin":"7.2.0"},"_npmOperationalInternal":{"tmp":"tmp/packager_18.4.4_1756330552093_0.3218275873672467","host":"s3://npm-registry-packages-npm-production"},"readme":"# @electron/packager\n\nPackage your [Electron](https://electronjs.org) app into OS-specific bundles (`.app`, `.exe`, etc.) via JavaScript or the command line.\n\n[![Test](https://github.com/electron/packager/actions/workflows/test.yml/badge.svg)](https://github.com/electron/packager/actions/workflows/test.yml)\n[![electron-nightly Canary](https://github.com/electron/packager/actions/workflows/canary.yml/badge.svg)](https://github.com/electron/packager/actions/workflows/canary.yml)\n[![Coverage Status](https://codecov.io/gh/electron/packager/branch/main/graph/badge.svg)](https://codecov.io/gh/electron/packager)\n[![npm](https://img.shields.io/npm/v/@electron/packager.svg?style=flat)](https://npm.im/@electron/packager)\n[![API docs](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fregistry.npmjs.org%2F%40electron%2Fpackager%2Flatest&query=%24.version&logo=typescript&logoColor=white&label=API%20Docs)](https://packages.electronjs.org/packager)\n[![Discord](https://img.shields.io/discord/745037351163527189?color=blueviolet&logo=discord)](https://discord.com/invite/APGC3k5yaH)\n\n[Supported Platforms](#supported-platforms) |\n[Installation](#installation) |\n[Usage](#usage) |\n[Contributing](https://github.com/electron/packager/blob/main/CONTRIBUTING.md) |\n[Support](https://github.com/electron/packager/blob/main/SUPPORT.md) |\n[Related Apps/Libraries](#related) |\n[FAQ](https://github.com/electron/packager/blob/main/docs/faq.md) |\n[Release Notes](https://github.com/electron/packager/blob/main/NEWS.md)\n\n---\n\n## About\n\nElectron Packager is a command line tool and Node.js library that bundles Electron-based application\nsource code with a renamed Electron executable and supporting files into folders ready for distribution.\n\nFor creating distributables like installers and Linux packages, consider using either [Electron\nForge](https://github.com/electron/forge) (which uses Electron Packager\ninternally), or one of the [related Electron tools](#distributable-creators), which utilizes\nElectron Packager-created folders as a basis.\n\nNote that packaged Electron applications can be relatively large. A zipped, minimal Electron\napplication is approximately the same size as the zipped prebuilt binary for a given target\nplatform, target arch, and [Electron version](https://github.com/electron/electron/releases)\n_(files named `electron-v${version}-${platform}-${arch}.zip`)_.\n\n## Supported Platforms\n\nElectron Packager is known to run on the following **host** platforms:\n\n- Windows (32/64 bit)\n- macOS (formerly known as OS X)\n- Linux (x86/x86_64)\n\nIt generates executables/bundles for the following **target** platforms:\n\n- Windows (also known as `win32`, for x86[^ia32], x86_64, and arm64 architectures)\n- macOS (also known as `darwin`) / [Mac App Store](https://electronjs.org/docs/tutorial/mac-app-store-submission-guide/) (also known as `mas`)[^macos] (for x86_64, arm64, and universal architectures)\n- Linux (for x86, x86_64, armv7l[^ia32], arm64, and mips64el architectures)\n\n[^macos]: Note for macOS / Mac App Store target bundles: the `.app` bundle can only be signed when building on a host macOS platform.\n\n[^ia32]: Windows x86 (`ia32`) and Linux `armv7l` builds are only published for Electron <= 43 — starting with Electron 44.0.0-alpha.4, official builds for these architectures are no longer provided.\n\n## Installation\n\nThis module requires Node.js 22.12.0 or higher to run.\n\n```sh\nnpm install --save-dev @electron/packager\n```\n\nIt is **not** recommended to install `@electron/packager` globally.\n\n## Usage\n\n### Via JavaScript\n\nJavaScript API usage can be found in the [API documentation](https://packages.electronjs.org/packager).\n\n### From the command line\n\nRunning Electron Packager from the command line has this basic form:\n\n```sh\nnpx @electron/packager <sourcedir> <appname> --platform=<platform> --arch=<arch> [optional flags...]\n```\n\nThis will:\n\n- Find or download the correct release of Electron\n- Use that version of Electron to create an app in `<out>/<appname>-<platform>-<arch>` _(this can be customized via an optional flag)_\n\n`--platform` and `--arch` can be omitted, in two cases:\n\n- If you specify `--all` instead, bundles for all valid combinations of target\n  platforms/architectures will be created.\n- Otherwise, a single bundle for the host platform/architecture will be created.\n\nFor an overview of the other optional flags, run `electron-packager --help` or see\n[usage.txt](https://github.com/electron/packager/blob/main/usage.txt). For\ndetailed descriptions, see the [API documentation](https://electron.github.io/packager/main/).\n\nFor flags that are structured as objects, you can pass each option as via dot notation as such:\n\n```sh\nnpx @electron/packager --flag.foo=\"bar\"\n# will pass in { flag: { foo: \"bar\"} } as an option to the Electron Packager API\n```\n\nIf `appname` is omitted, this will use the name specified by \"productName\" or \"name\" in the nearest package.json.\n\n**Characters in the Electron app name which are not allowed in all target platforms' filenames\n(e.g., `/`), will be replaced by hyphens (`-`).**\n\nYou should be able to launch the app on the platform you built for. If not, check your settings and try again.\n\n**Be careful** not to include `node_modules` you don't want into your final app. If you put them in\nthe `devDependencies` section of `package.json`, by default none of the modules related to those\ndependencies will be copied in the app bundles. (This behavior can be turned off with the\n`prune: false` API option or `--no-prune` CLI flag.) In addition, folders like `.git` and\n`node_modules/.bin` will be ignored by default. You can use `--ignore` to ignore files and folders\nvia a regular expression (_not_ a [glob pattern](https://en.wikipedia.org/wiki/Glob_%28programming%29)).\nExamples include `--ignore=\\.gitignore` or `--ignore=\"\\.git(ignore|modules)\"`.\n\n#### Example\n\nLet's assume that you have made an app based on the [minimal-repro](https://github.com/electron/minimal-repro)\nrepository on an Apple Silicon macOS device with the following file structure:\n\n```plaintext\nfoobar\n├── package.json\n├── index.html\n├── […other files, like the app's LICENSE…]\n└── script.js\n```\n\n…and that the following is true:\n\n- `@electron/packager` is installed locally\n- `productName` in `package.json` has been set to `Foo Bar`\n- The `electron` module is in the `devDependencies` section of `package.json`, and set to the exact version of `38.3.0`.\n- `npm install` for the `Foo Bar` app has been run at least once\n\nWhen one runs the following command for the first time in the `foobar` directory:\n\n```plaintext\nnpx @electron/packager .\n```\n\n`@electron/packager` will do the following:\n\n- Use the current directory for the `sourcedir`\n- Infer the `appname` from the `productName` in `package.json`\n- Infer the `appVersion` from the `version` in `package.json`\n- Infer the `platform` and `arch` from the host, in this example, `darwin` platform and `arm64` arch.\n- Download the darwin arm64 build of Electron 38.3.0 (and cache the downloads in `~/.electron`)\n- Build the macOS `Foo Bar.app`\n- Place `Foo Bar.app` in `foobar/Foo Bar-darwin-arm64/` (since an `out` directory was not specified, it used the current working directory)\n\nThe file structure now looks like:\n\n```plaintext\nfoobar\n├── Foo Bar-darwin-x64\n│   ├── Foo Bar.app\n│   │   └── […Mac app contents…]\n│   ├── LICENSE [the Electron license]\n│   └── version\n├── […other application bundles, like \"Foo Bar-win32-x64\" (sans quotes)…]\n├── package.json\n├── index.html\n├── […other files, like the app's LICENSE…]\n└── script.js\n```\n\nThe `Foo Bar.app` folder generated can be executed by a system running macOS, which will start the packaged Electron app.\nThis is also true of the Windows x64 build on a Windows device (via `Foo Bar-win32-x64/Foo Bar.exe`), and so on.\n\n## Related\n\n- [Electron Forge](https://github.com/electron/forge) - creates, builds, and distributes modern Electron applications\n\n### Distributable Creators\n\n- [electron-installer-zip](https://github.com/electron-userland/electron-installer-zip) - creates symlink-compatible ZIP files\n\nWindows:\n\n- [electron-winstaller](https://github.com/electron/windows-installer) - Squirrel.Windows-based installer from the Electron maintainers group\n- [electron-windows-msix](https://github.com/electron-userland/electron-windows-msix) - creates an MSIX package\n- [electron-windows-store](https://github.com/electron-userland/electron-windows-store) - creates an AppX package for the Windows Store\n- [electron-wix-msi](https://github.com/electron-userland/electron-wix-msi) - creates traditional MSI installers\n- [electron-installer-windows](https://github.com/electron-userland/electron-installer-windows) - alternative Squirrel.Windows-based installer\n\nmacOS:\n\n- [electron-installer-dmg](https://github.com/electron-userland/electron-installer-dmg) - creates a DMG\n\nLinux:\n\n- [electron-installer-debian](https://github.com/electron-userland/electron-installer-debian) - creates a DEB file\n- [electron-installer-redhat](https://github.com/electron-userland/electron-installer-redhat) - creates an RPM\n- [electron-installer-flatpak](https://github.com/endlessm/electron-installer-flatpak) - creates a Flatpak file\n- [electron-installer-snap](https://github.com/electron-userland/electron-installer-snap) - creates a Snap file\n\n### Plugins\n\nThese Node modules utilize Electron Packager API hooks:\n\n- [electron-packager-languages](https://npm.im/electron-packager-languages) - sets the locales\n  available to Electron when packaged, which is used by the Mac App Store, among other places\n- [electron-packager-plugin-non-proprietary-codecs-ffmpeg](https://www.npmjs.com/package/electron-packager-plugin-non-proprietary-codecs-ffmpeg) - replaces the normal version of FFmpeg in Electron with a version without proprietary codecs\n- [@electron/rebuild](https://github.com/electron/rebuild) - rebuilds native Node.js modules\n  against the packaged Electron version\n","publish_time":1756330552271,"_cnpm_publish_time":1756330552271,"dist-tags":{"latest":"20.3.0"}}