# consolidator

> Consolidate sources to a destination.

Latest version **1.0.2** (published 2017-11-22) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2017-11-22 |
| First published | 2017-07-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Anthony Telljohann-Smothers |
| Maintainers | atelljohannsmothers |
| Keywords | consolidate, merge, combine, unify, sources, files, reports, documents, destination, file, report, document |

## Links

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

## Dependencies (3)

- [is](https://npm.io/package/is.md) ^3.2.1
- [async-file](https://npm.io/package/async-file.md) ^2.0.2
- [glob-promise](https://npm.io/package/glob-promise.md) ^3.1.0

## Alternatives

- [unionfs](https://npm.io/package/unionfs.md) — 2.2M weekly downloads
- [path-starts-with](https://npm.io/package/path-starts-with.md) — 35.9K weekly downloads
- [redzip](https://npm.io/package/redzip.md) — 1.2K weekly downloads
- [vscode-anymatch](https://npm.io/package/vscode-anymatch.md) — 848 weekly downloads
- [@ledgerhq/coin-filecoin](https://npm.io/package/@ledgerhq/coin-filecoin.md) — 793 weekly downloads

## Recent versions

- 1.0.2 (latest) — 2017-11-22
- 1.0.1 — 2017-09-26
- 1.0.0 — 2017-07-20

## README

# consolidator

[![Greenkeeper badge](https://badges.greenkeeper.io/atelljohannsmothers/consolidator.svg)](https://greenkeeper.io/)
[![Build Status](https://travis-ci.org/atelljohannsmothers/consolidator.svg?branch=master)](https://travis-ci.org/atelljohannsmothers/consolidator)
[![codecov](https://codecov.io/gh/atelljohannsmothers/consolidator/branch/master/graph/badge.svg)](https://codecov.io/gh/atelljohannsmothers/consolidator)
[![NPM version](https://img.shields.io/npm/v/consolidator.svg)](https://www.npmjs.com/package/consolidator)
[![Styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)

Consolidate sources to a destination.

## Usage

Install with yarn

```
yarn add consolidator
```

```js
import {
  consolidate,
  consolidateGlobToFile,
  consolidateFilesToFile,
  consolidateFileToFile
} from 'consolidator';
```

### API

#### `consolidate(sources, destination)`

* `sources` `{String}` glob pattern
* `destination` `{String}` file path

```js
consolidate('sources/*', 'destination/consolidated');
```

#### `consolidate(sources, destination)`

* `sources` `{Array}` file paths
* `destination` `{String}` file path

```js
consolidate(['sources/source', 'other-sources/source'], 'destination/consolidated');
```

#### `consolidateGlobToFile(sources, destination)`

* `sources` `{String}` glob pattern
* `destination` `{String}` file path

```js
consolidateGlobToFile('sources/*', 'destination/consolidated');
```

#### `consolidateFilesToFile(sources, destination)`

* `sources` `{Array}` file paths
* `destination` `{String}` file path

```js
consolidateFilesToFile(['sources/source', 'other-sources/source'], 'destination/consolidated');
```

#### `consolidateFileToFile(source, destination)`

* `source` `{String}` file path
* `destination` `{String}` file path

```js
consolidateFileToFile('sources/source', 'destination/consolidated');
```

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