# @phylum/gulp-pipeline

> Create a gulp task that runs a pipeline or pipeline task.

Latest version **3.0.0** (published 2019-01-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install @phylum/gulp-pipeline
pnpm add @phylum/gulp-pipeline
yarn add @phylum/gulp-pipeline
bun add @phylum/gulp-pipeline
```

## 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 | 3.0.0 |
| Published | 2019-01-28 |
| First published | 2019-01-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Max J. Polster |
| Maintainers | mpt |

## Links

- npm: https://www.npmjs.com/package/@phylum/gulp-pipeline
- Repository: https://github.com/phylumjs/gulp-pipeline
- Homepage: https://github.com/phylumjs/gulp-pipeline#readme
- Issues: https://github.com/phylumjs/gulp-pipeline/issues
- npm.io page: https://npm.io/package/@phylum/gulp-pipeline

## Recent versions

- 3.0.0 (latest) — 2019-01-28

## README

# Gulp Pipeline
[![Coverage Status](https://coveralls.io/repos/github/phylumjs/gulp-pipeline/badge.svg?branch=master)](https://coveralls.io/github/phylumjs/gulp-pipeline?branch=master)
[![Build Status](https://travis-ci.com/phylumjs/gulp-pipeline.svg?branch=master)](https://travis-ci.com/phylumjs/gulp-pipeline)
[![Version](https://img.shields.io/npm/v/@phylum/gulp-pipeline.svg) ![License](https://img.shields.io/npm/l/@phylum/gulp-pipeline.svg)](https://npmjs.org/package/@phylum/gulp-pipeline)

Create a gulp task that runs a pipeline or pipeline task.

## Installation
```js
npm i @phylum/gulp-pipeline gulp
```

## Usage
```js
const gulp = require('gulp')
const wrap = require('@phylum/gulp-pipeline')
```

### `wrap(pipelineOrTask[, options])`
Create a gulp task from an existing pipeline or pipeline task.
```js
const gulpTask = wrap(async ctx => {
    console.log('Hello World!')
}, {
    name: 'example-task',
    description: 'Just another code example..'
})

// Usage example:
gulp.task(gulpTask)
```
+ pipelineOrTask `<Pipeline> | <function>` - A pipeline or a pipeline task.
+ options `<object>` - Optional. An object with the following options:
    + name `<string>` - Optional gulp task name. Default is `'pipeline'`
    + description `<string>` - Optional gulp task description.
    + flags `<object>` - Optional gulp task flags.
    + run `<string> | <function>` - Optional. The action to run the pipeline:
        + `'once'` - **Default.** Ensure that the pipeline is enabled. The task will complete when the pipeline resolves or rejects.
        + `'clean'` - Disable the pipeline, then enable. The task will complete when the pipeline resolves or rejects.
        + `<function>` - A function that is called with the pipeline as first argument and must return a promise to signal async completion.
    + autoDisposeUnused `<boolean>` - Optional. This option is passed to the pipeline constructor when a pipeline task is wrapped.

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