UNPKG

876 BTypeScriptView Raw
1/// <reference types="node"/>
2
3import gulpMatch = require("gulp-match");
4import minimatch = require("minimatch");
5
6/**
7 * gulp-if will pipe data to stream whenever condition is truthy.
8 * If condition is falsey and elseStream is passed, data will pipe to elseStream
9 * After data is piped to stream or elseStream or neither, data is piped down-stream.
10 *
11 * @param condition whether input should be piped to stream
12 * @param stream the stream to pipe to if condition is true
13 * @param elseStream (optional) the stream to pipe to if condition is false
14 * @param minimatchOptions (optional) the minimatch options when matching glob conditions
15 */
16declare function gulpIf(
17 condition: gulpMatch.MatchCondition,
18 stream: NodeJS.ReadWriteStream,
19 elseStream?: NodeJS.ReadWriteStream,
20 minimatchOptions?: minimatch.IOptions,
21): NodeJS.ReadWriteStream;
22
23export = gulpIf;