gulp-funnel

Join streams into an array

gulp-funnel

Join stream of files into an array, useful making e.g. list of files processed

Example, render a list of blog posts, using index.html as template

var funnel = require('gulp-funnel');
gulp.task('index', function() {
  gulp.src('./posts/*.md')
    .pipe(frontMatter(fmOpts))
    .pipe(funnel())
    .pipe(nunjucks({defaultTemplate: 'index'}))
});

Destination filename, index.html by default

Destination property of the File, where to store the list of files. 'files' by default.

Sort filelist, -1 for sorting descending, 1 ascending.

MIT © Mikko Lehtinen