title: How can I use the path from gulp.src() in gulp.dest()?
body: <p>Trying to create a gulp task that will pipe a bunch of files from different folders through LESS and then output them to a folder based on the original source. Consider this folder structure:</p>
  
  <pre><code>Project
  +-- /Module_A
  |   +- /less
  |   |  +- a.less
  |   +- a.css
  |
  +-- /Module_B
      +- /less
      |  +- b.less
      +- b.css
  </code></pre>
  
  <p>Here's my gulpfile:</p>
  
  <pre><code>var gulp = require('gulp');
  var gutil = require('gulp-util');
  var less = require('gulp-less');
  
  gulp.task('compileLess', function () {
    gulp.src('./*/less/*.less')
      .pipe(less())
      .pipe(gulp.dest( ??? ));
  });
  
  gulp.task('default', ['compileLess']);
  </code></pre>
  
  <p>I know gulp.dest() expects a path to be passed in but in my example the path will be different based on the source file. So how can I grab the path from source, modify it and then pass it into gulp.dest()?</p>
  
  <p>Or am I going about this the wrong way?</p>