gulp-feed
jpmonette/feed wrapper for gulp, allowing you create any supported feed format. The files contents are streamed into a stream of Vinyl files and so generates in parallel.
Installation
npm install @zadkiel/gulp-feed --save
Usage
const gulpFeed = require("@zadkiel/gulp-feed");
gulpFeed(posts, options).pipe(...);
Example
const posts = [{
title: 'My super title',
content: 'My super content',
}];
const options = {
// options from feed (see https://github.com/jpmonette/feed#example)
//
transform: post => post,
// `transform` can be used to transform the data before giving it to feed (to adapt it)
render: {
'mysuperrss.xml': 'rss2',
// filename: wanted format (rss2, atom1 or json1)
},
};
gulpFeed(posts, options)
.pipe(gulp.dest("assets/"));
TODO
- [ ] More tests