I'm using [gulp.js](http://gulpjs.com/). I want to pipe the resulting JSON data from [gulp-yaml](https://www.npmjs.com/package/gulp-yaml), straight into [gulp-ejs](https://www.npmjs.com/package/gulp-ejs). My logic says that I'm probably going to have to get synchronous at some point?

What I have tried thus far:

```
var yaml = require('gulp-yaml');
var ejs = require('gulp-ejs');

gulp.task('yaml', function(){

    return gulp.src('./path/to/template.ejs')
        .pipe( ejs( gulp.src('./path/to/data.yml').pipe( yaml() ) ) )
        .pipe(gulp.dest('./path/to/dest'));

});

```

I realise that the above is an idiotic script as I'm essentially trying to pass a stream as an argument to `ejs`. And as predicted, it doesn't work. I've tried numerous other things but I'm guessing someone has done this before?

I reckon [gulp-data](https://www.npmjs.com/package/gulp-data) will have something to do with the solution...