I want to use one source file to generate multiple destination files with different characteristics. Here's a watered down version of what I want to do:
gulp.task('build', function() {
var src = gulp.src('myfile.txt')
for (var i = 0; i < 10; i++) {
src
.pipe(someplugin(i))
.pipe(rename('myfile-' + i + '.txt'))
.dest('./build')
}
});
Presumably, "someplugin" would change the file contents based on the index passed to it, so the code above would generate 10 files, each with slightly different content.
This doesn't work, and I didn't expect it to, but is there another way to achieve this?