# global-pack

> Like [browser-pack](https://github.com/substack/browser-pack), but mounts modules to `window.modules` (or a specified scope).

Latest version **1.1.1** (published 2017-08-30) · ISC license · 0 weekly downloads

## Install

```sh
npm install global-pack
pnpm add global-pack
yarn add global-pack
bun add global-pack
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2017-08-30 |
| First published | 2017-08-28 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | chrkirk |

## Links

- npm: https://www.npmjs.com/package/global-pack
- npm.io page: https://npm.io/package/global-pack

## Dependencies (2)

- [through2](https://npm.io/package/through2.md) ^2.0.3
- [combine-source-map](https://npm.io/package/combine-source-map.md) ^0.8.0

## Recent versions

- 1.1.1 (latest) — 2017-08-30
- 1.1.0 — 2017-08-29
- 1.0.0 — 2017-08-28

## README

# Global-pack

Like [browser-pack](https://github.com/substack/browser-pack), but mounts modules to `window.modules` (or a specified scope).

Whereas browser-pack emits strings of Javascript that must be concatenated to run as valid JS and defines modules within an internal scope, global-pack emits strings that are themselves valid JS and defines modules in `window.modules`. This allows you to split each dep into a separate file and embed it via a `<script>` tag.

## Options

* `scope`: String. The scope to mount modules. Defaults to `window.modules`.
* `objectMode`: Boolean. If `true`, emit objects instead of strings. For every module-dep object ingested, the same object will be emitted with a `content` property set to the packed JS. Warning: global-pack will also emit two extra objects, `prelude` and `postlude`, whose properties include __only__ `id` and `content`.

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