# @crabnebula/packager

> Executable packager and bundler distributed as a CLI and library

Latest version **0.11.2** (published 2024-10-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install @crabnebula/packager
pnpm add @crabnebula/packager
yarn add @crabnebula/packager
bun add @crabnebula/packager
```

Provides the command `packager`.

## Health

**Score 40/100 (D)** — status: maintenance-mode.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.11.2 |
| Published | 2024-10-10 |
| First published | 2023-12-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >= 10 |
| Dependencies | 5 |
| Unpacked size | 152.8 KB |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| Author | CrabNebula Ltd. |
| Maintainers | amr-crabnebula, tillmann-crabnebula, crabnebula-npm, lucasfernog-crabnebula |

## Links

- npm: https://www.npmjs.com/package/@crabnebula/packager
- npm.io page: https://npm.io/package/@crabnebula/packager

## Dependencies (5)

- [fs-extra](https://npm.io/package/fs-extra.md) ^11.1.1
- [galactus](https://npm.io/package/galactus.md) ^1.0.0
- [deepmerge](https://npm.io/package/deepmerge.md) ^4.3.1
- [extract-zip](https://npm.io/package/extract-zip.md) ^2.0.1
- [@electron/get](https://npm.io/package/@electron/get.md) ^3.0.0

## Recent versions

- 0.11.2 (latest) — 2024-10-10
- 0.11.1 — 2024-10-09
- 0.11.0 — 2024-09-26
- 0.10.3 — 2024-09-05
- 0.10.2 — 2024-09-02
- 0.10.1 — 2024-07-22
- 0.10.0 — 2024-07-03
- 0.9.1 — 2024-06-26
- 0.9.0 — 2024-06-04
- 0.8.1 — 2024-04-17
- 0.8.0 — 2024-04-16
- 0.7.0 — 2024-03-27
- 0.6.0 — 2024-01-30
- 0.2.0 — 2024-01-28
- 0.1.5 — 2024-01-20
- … 4 more at https://npm.io/package/@crabnebula/packager/versions

## README

# @crabnebula/packager

Executable packager, bundler and updater. A cli tool and library to generate installers or app bundles for your executables.
It also comes with useful addons:

- an [updater](https://www.npmjs.com/package/@crabnebula/updater)
- a [resource resolver](https://www.npmjs.com/package/@crabnebula/packager-resource-resolver)

#### Supported packages:

- macOS
  - DMG (.dmg)
  - Bundle (.app)
- Linux
  - Debian package (.deb)
  - AppImage (.AppImage)
  - Pacman (.tar.gz and PKGBUILD)
- Windows
  - NSIS (.exe)
  - MSI using WiX Toolset (.msi)

### CLI

The packager is distributed on NPM as a CLI, you can install it:

```sh
# pnpm
pnpm add -D @crabnebula/packager
# yarn
yarn add -D @crabnebula/packager
# npm
npm i -D @crabnebula/packager
```

You then need to configure your app so the CLI can recognize it.
Configuration can be done in `Packager.toml` or `packager.json` in your project or `packager` key in `packager.json`
Once, you are done configuring your app, run:

```sh
# pnpm
pnpm packager
# yarn
yarn packager
# npm
npx packager
```

### Configuration

By default, the packager reads its configuration from `Packager.toml` or `packager.json` if it exists, and from `packager.json` key in `packager.json`,
You can also specify a custom configuration using the `-c/--config` cli argument.

For a full list of configuration options, see https://docs.rs/cargo-packager/latest/cargo_packager/config/struct.Config.html.

You could also use the [schema](./schema.json) file from GitHub to validate your configuration or have auto completions in your IDE.

### Building your application before packaging

By default, the packager doesn't build your application, so if your app requires a compilation step, the packager has an option to specify a shell command to be executed before packaing your app, `beforePackagingCommand`.

### Library

The packager is also a library that you can import and integrate into your tooling.

## Licenses

MIT or MIT/Apache 2.0 where applicable.

---
_Source: https://npm.io/package/@crabnebula/packager · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
