gulp-subset-process
Process a subset of the stream and put the result into place. When order matters.
Install
npm install gulp-subset-process --save-dev
Description
Say, you need to do something with a subset of the stream and you need to put the result into place of first occurrence of a file of your subset in the stream (or last occurrence, or leave all occurrences in the same places). That's what this plugin do.
Examples
var subsetProcess = ; gulp; gulp; gulp; gulp;
API
subsetProcess(pattern, subtask, options)
Returns processed stream.
pattern
(String
or Array
)
Accepts a string/array with globbing patterns which are run through multimatch.
subtask
(Function
)
Callback, first argument is a stream with a subset of initial stream matching
pattern
.
options
(Object
)
Accepts minimatch options and
occurrence
option with 'first'
(default), 'last'
and 'keep'
values to
insert the result in place of first occurrence of a file of your subset, in
place of last occurrence or keep all occurrences.