# gulp-pipe

> Expose your flows without laying so much `.pipe()`.

Latest version **1.0.4** (published 2015-08-10) · MIT license · 0 weekly downloads

## Install

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

## 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.4 |
| Published | 2015-08-10 |
| First published | 2015-02-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 10 |
| Author | Blake La Pierre |
| Maintainers | blakelapierre |
| Keywords | gulp, pipe, streams, build, simplify, gulpfriendly, gulpplugin |

## Links

- npm: https://www.npmjs.com/package/gulp-pipe
- Repository: https://github.com/blakelapierre/gulp-pipe
- Issues: https://github.com/blakelapierre/gulp-pipe/issues
- npm.io page: https://npm.io/package/gulp-pipe

## 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

- 1.0.4 (latest) — 2015-08-10
- 1.0.3 — 2015-02-06
- 1.0.1 — 2015-02-06
- 1.0.0 — 2015-02-06

## README

# gulp-pipe

#### Expose your flows without laying so much `.pipe()`

Get rid of needless boilerplate noise and just focus on the *stuff that changes*.

Turn this (195 non-space characters):
````javascript
return gulp.src(paths.scripts)
           .pipe(sourcemaps.init())
           .pipe(to5())
           .pipe(concat('index.js'))
           .pipe(sourcemaps.write('.'))
           .pipe(gulp.dest(paths.dist))
           .on('error', function(e) { console.log(e); });
````

Into this (175 non-space characters):
````javascript
return pipe([
        gulp.src(paths.scripts)
        ,sourcemaps.init()
        ,to5()
        ,concat('index.js')
        ,sourcemaps.write('.')
        ,gulp.dest(paths.dist)
       ])
       .on('error', function(e) { console.log(e); });
````

Or this:
````javascript
return pipe(gulp.src(paths.scripts),
            [
              sourcemaps.init(),
              to5(),
              concat('index.js'),
              sourcemaps.write('.'),
              gulp.dest(paths.dist)
            ])
            .on('error', function(e) {console.log(e);});
````


### [Source](/index.js):

````javascript
module.exports = function pipe(stream, tubes) {
  tubes = tubes || stream.slice(1);
  return tubes.reduce(function(stream, tube) { return stream.pipe(tube); }, Array.isArray(stream) ? stream[0] : stream);
};
````

### Installation
`npm install --save gulp-pipe`

### Under consideration

1. Investigate flows for allowing inline `.on`, as in [this example](https://github.com/greypants/gulp-starter/blob/1466eee867271271d91d7f837a1291c40e139fa3/gulp/tasks/browserify.js).

### Notes

1. This library is not specific to, nor has dependencies on, [gulp](https://github.com/gulpjs/gulp). It will work for any Streams, however it was created to simplify my `gulpfile.js`'s

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