# gulp-footer

> Gulp extension to add footer to file(s) in the pipeline.

Latest version **2.1.0** (published 2021-11-03) · MIT license · 0 weekly downloads

## Install

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

## 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 | 2.1.0 |
| Published | 2021-11-03 |
| First published | 2013-10-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 8.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 10 |
| Author | Michael J. Ryan |
| Maintainers | tracker1, yocontra |
| Keywords | footer, gulpplugin, eventstream |

## Links

- npm: https://www.npmjs.com/package/gulp-footer
- Repository: https://github.com/gulp-community/gulp-footer
- Homepage: https://github.com/gulp-community/gulp-footer#readme
- Issues: https://github.com/gulp-community/gulp-footer/issues
- npm.io page: https://npm.io/package/gulp-footer

## Dependencies (2)

- [lodash](https://npm.io/package/lodash.md) ^4.17.21
- [map-stream](https://npm.io/package/map-stream.md) ^0.0.7

## Alternatives

- [byte-size](https://npm.io/package/byte-size.md) — 2.1M weekly downloads
- [speed-limiter](https://npm.io/package/speed-limiter.md) — 16.0K weekly downloads
- [@powersync/node](https://npm.io/package/@powersync/node.md) — 10.9K weekly downloads
- [@ledgerhq/coin-cardano](https://npm.io/package/@ledgerhq/coin-cardano.md) — 1.0K weekly downloads
- [@jayesol/jayeson.lib.streamfinder](https://npm.io/package/@jayesol/jayeson.lib.streamfinder.md) — 1.0K weekly downloads

## Recent versions

- 2.1.0 (latest) — 2021-11-03
- 1.1.2 (old-version) — 2018-01-25
- 2.0.2 — 2018-12-12
- 2.0.1 — 2018-01-17
- 2.0.0 — 2018-01-16
- 1.1.1 — 2018-01-16
- 1.1.0 — 2018-01-16
- 1.0.5 — 2014-07-08
- 0.4.0 — 2013-10-04

## README

The canonical location of this project is now [gulp-community/gulp-footer](https://github.com/gulp-community/gulp-footer).

# gulp-footer [![NPM version](https://badge.fury.io/js/gulp-footer.png)](http://badge.fury.io/js/gulp-footer) [![Build Status](https://travis-ci.org/tracker1/gulp-footer.png)](https://travis-ci.org/tracker1/gulp-footer)

gulp-footer is a Gulp extension to add a footer to file(s) in the pipeline.  [Gulp is a streaming build system](https://github.com/gulpjs/gulp) utilizing [node.js](http://nodejs.org/).

```javascript
var footer = require('gulp-footer');
```

## API

### footer(text, data)

#### text

Type: `String`  
Default: `''`  

The template text.


#### data

Type: `Object`  
Default: `{}`  

The data object used to populate the text.


## Usage

```javascript
var footer = require('gulp-footer');

gulp.src('./foo/*.js')
  .pipe(footer('Hello'))
  .pipe(gulp.dest('./dist/')

gulp.src('./foo/*.js')
  .pipe(footer('Hello <%= name %>\n', { name : 'World'} ))
  .pipe(gulp.dest('./dist/')

gulp.src('./foo/*.js')
  .pipe(footer('Hello ${name}\n', { name : 'World'} ))
  .pipe(gulp.dest('./dist/')


//
var pkg = require('./package.json');
var banner = ['/**',
  ' * <%= pkg.name %> - <%= pkg.description %>',
  ' * @version v<%= pkg.version %>',
  ' * @link <%= pkg.homepage %>',
  ' * @license <%= pkg.license %>',
  ' */',
  ''].join('\n');

//passing in the text
gulp.src('./foo/*.js')
  .pipe(footer(banner, { pkg : pkg } ))
  .pipe(gulp.dest('./dist/')

//reading from a file for the text
var bannerText = fs.readFileSync('banner.js');

/*********************************************/
//If you want the text from a file...
var fs = require('fs');
var banner = fs.readFileSync('banner.txt');
```

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