# gulp-trailer

> add a file to a source stream after all others are done

Latest version **0.2.0** (published 2014-05-31) · ISC license · 0 weekly downloads

## Install

```sh
npm install gulp-trailer
pnpm add gulp-trailer
yarn add gulp-trailer
bun add gulp-trailer
```

## 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.2.0 |
| Published | 2014-05-31 |
| First published | 2014-05-31 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | jden |
| Maintainers | jden |
| Keywords | gulp, flush, trailers, end, add |

## Links

- npm: https://www.npmjs.com/package/gulp-trailer
- Repository: git@github.com:jden/node-gulp-trailer
- Homepage: https://github.com/jden/node-gulp-trailer
- Issues: https://github.com/jden/node-gulp-trailer/issues
- npm.io page: https://npm.io/package/gulp-trailer

## Dependencies (2)

- [vinyl](https://npm.io/package/vinyl.md) ^0.2.3
- [through2](https://npm.io/package/through2.md) ^0.4.2

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 0.2.0 (latest) — 2014-05-31
- 0.1.0 — 2014-05-31

## README

# gulp-trailer
add a file to a source stream after all others are done

## usage
```js
var gulpTrailer = require('gulp-trailer')
var gulp = require('gulp')

var files = []

gulp.src('./**/*.js')
  .on('data', function (x) {
    files.push(x.path)
  })
  .pipe(trailer('./manifest.json', function (cb) {
    cb(null, JSON.stringify(files))
  }))
  .pipe(gulp.dest('./dest'))
```
this example keeps a list of all files written and then creates a `manifest.json` file with an array of all their paths


## api

### `trailer(filename: String, endFn : Function) => VinylThroughStream`

call `trailer` with a `filename` for the new file you want to add and an asynchronous `endFn` which will be used to return the contents of the file.

Your `endFn` should call its callback with a `String`, a `Buffer` or a `Stream`.

## installation

    $ npm install gulp-trailer


## running the tests

From package root:

    $ npm install
    $ npm test


## contributors

- jden <jason@denizac.org>


## license

ISC. (c) MMXIV jden <jason@denizac.org>. See LICENSE.md

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