title: Gulp: How do I read file content into a variable?
body: <p>I have a gulp task that needs to read a file into a variable, and then use its content as input for a different function that runs on the files in the pipe. How do I do that?</p>
  
  <p>Example psuedo-psuedo-code</p>
  
  <pre><code>gulp.task('doSometing', function() {
    var fileContent=getFileContent("path/to/file.something"); //How?
  
    return gulp.src(dirs.src + '/templates/*.html')
      .pipe(myFunction(fileContent))
      .pipe(gulp.dest('destination/path));
  });
  </code></pre>