1.5.0 • Published 9 years ago
gulp-collections v1.5.0
gulp-collections
Parses collections of files, optionally parsing. Ideal for use in static site generation
collections(options)
options
Type: Object
Options passed to gulp-collections.
options.count
Type: Number
Number of items to limit collection to
options.sortBy
Type: Function
Function to sort items by. Takes two arguments, the items to compare.
e.g.
function simpleSort(a, b) {
return (a.attributes.sort > b.attributes.sort) ?
-1 : (a.attributes.sort < b.attributes.sort) ?
1 : 0;
}