# strong-pack

> Like npm pack but more inclusive

Latest version **1.0.2** (published 2016-04-14) · Artistic-2.0 license · 0 weekly downloads

## Install

```sh
npm install strong-pack
pnpm add strong-pack
yarn add strong-pack
bun add strong-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.0.2 |
| Published | 2016-04-14 |
| First published | 2015-11-25 |
| Weekly downloads | 0 |
| License | Artistic-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Ryan Graham |
| Maintainers | bajtos, chandadharap, ibmcloud-admin, kraman, octet, rfeng, ritch, rmg, strongloop |

## Links

- npm: https://www.npmjs.com/package/strong-pack
- Repository: https://github.com/strongloop/strong-pack
- Homepage: https://github.com/strongloop/strong-pack#readme
- Issues: https://github.com/strongloop/strong-pack/issues
- npm.io page: https://npm.io/package/strong-pack

## Dependencies (2)

- [debug](https://npm.io/package/debug.md) ^2.2.0
- [tar-fs](https://npm.io/package/tar-fs.md) ^1.8.1

## Recent versions

- 1.0.2 (latest) — 2016-04-14
- 1.0.1 — 2016-02-26
- 1.0.0 — 2015-11-25

## README

strong-pack
===========

Simple wrapper for `tar` for packaging a node application, including everything
except version control files (`.git`, `.svn`, `.hg`, etc.). In other words, it
is like `npm pack`, but it does **not** honour `.npmignore` and `.gitignore`.

### Usage

The strong-pack module exports a single function.

#### `pack(dirname)`
 * arguments:
   * `dirname` is the path to a node module.
 * return:
   * a readable stream containing the tar stream, rooted in `package/` just like
    `npm pack`.

The readable stream that is returned is a `tar-stream` pack stream, which has
additional methods on it, including `.entry()` which can be used for injecting
files directly into the tar archive without having to create them on disk first.
See the [tar-stream docs](https://github.com/mafintosh/tar-stream#packing) for
more details.

#### Example

The following example is similar to running `npm pack path/to/app` if npm
ignored all of the normal rules for ignoring/including files.

```js
var fs = require('fs');
var gz = require('zlib').Gzip();
var pack = require('strong-pack');
var tgz = fs.createWriteStream('app.tgz', 'binary');
var appTar = pack('path/to/app');

// inject a file directly into the tar stream without creating a file on disk
appTar.entry({name: 'package/.injected.json'},
             JSON.stringify({key: 'secret'}) + '\n');

// Using pipe
// don't forget to handle errors and clean up ALL your streams!
appTar.pipe(gz).pipe(tgz);

// Using pump
// streams get cleaned up for you, only one place to check for an error
var pump = require('pump');
pump(appTar, gz, tgz, function(err) {
  // err || done! don't forget to check for an error!
});
```

### License

This module is dual licensed and can be used under the terms of either:
 * [Artistic 2.0 License](https://opensource.org/licenses/Artistic-2.0)

---
Copyright IBM Corp. 2015,2016. All Rights Reserved.

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