# distillify

> Browserify plugin that splits your bundle into separate files

Latest version **0.0.1** (published 2016-06-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install distillify
pnpm add distillify
yarn add distillify
bun add distillify
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2016-06-05 |
| First published | 2016-06-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6.0.0 |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Jannick Garthen |
| Maintainers | garthenweb |
| Keywords | browser-pack, browserify, browserify-plugin, browserify-tool, bundle, vendor |

## Links

- npm: https://www.npmjs.com/package/distillify
- Repository: https://github.com/garthenweb/distillify
- Homepage: https://github.com/garthenweb/distillify#readme
- Issues: https://github.com/garthenweb/distillify/issues
- npm.io page: https://npm.io/package/distillify

## Dependencies (3)

- [through2](https://npm.io/package/through2.md) ^2.0.1
- [minimatch](https://npm.io/package/minimatch.md) ^3.0.0
- [browser-pack](https://npm.io/package/browser-pack.md) ^6.0.1

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 0.0.1 (latest) — 2016-06-05

## README

# Distillify [![build status][1]][2]

A browserify plugin that splits your bundle into separate files.

## Caution

This is a first proof of concept and not battle tested. Its only tested in NodeJS v6 and will crash on lower versions due to ES2015 support.

## Installation

``` bash
npm install --save-dev distillify
```

## Usage

``` javascript
const fs = require('fs');
const browserify = require('browserify');
const distillify = require('distillify');
const b = browserify({ entries: ['example/entry.js']});
b.plugin(distillify, {
  outputs: {
    file: write('example/build.vendor.js'),
    pattern: 'node_modules/**',
  },
});

b.bundle().pipe(fs.createWriteStream('example/build.js'));

function write(outputFile) {
  return stream => stream.pipe(fs.createWriteStream(outputFile));
}
```

## Motivation

When updating your JavaScript application to introduce new features or fixing bugs you force your users to download the new code.

You might have parts of your application that are more frequently update than others. Often, those parts are external libraries.

When splitting your code into parts that are frequently updated and those that are not, your users need to download less JavaScript and will receive updates faster.

Distillify allows you to

* extract dependencies that should be extracted into another file by a pattern on the pathname
* only include those dependencies that need to be bundled with your code without further configuration
* integrate the code splitting without mayor changes to your existing code base

## License

Licensed under the [MIT License](https://opensource.org/licenses/mit-license.php).

[1]: https://travis-ci.org/garthenweb/distillify.svg
[2]: https://travis-ci.org/garthenweb/distillify

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