title: How to copy and inject the main-bower-files in one step using gulp?
body: <p>When deploying my app I want to copy the bower dependency to the <code>deploy</code> directory and inject the links to these files into the <code>index.html</code> that is also in the <code>deploy</code> directory.</p>
  
  <p>Each step alone works perfectly by I'm not able to combine them.</p>
  
  <p>Copy the files:</p>
  
  <pre><code>return gulp.src(mainBowerFiles(), { read: false })
      .pipe(gulp.dest('./deploy/lib/'));
  </code></pre>
  
  <p>Injecting the files:</p>
  
  <pre><code>return gulp.src('./deploy/index.html')
      .pipe(plugins.inject(
          gulp.src(mainBowerFiles(), { read: false }), { relative: true }))
      .pipe(gulp.dest('./deploy/'));
  </code></pre>
  
  <p>I think that I should do this in one step to keep the correct order of the dependent files.</p>
  
  <p>I tried this combination but it did not work out.</p>
  
  <pre><code>return gulp.src('./deploy/index.html')
      .pipe(plugins.inject(
          gulp.src(mainBowerFiles(), { read: false })
              .pipe(gulp.dest('./deploy/lib/'), { relative: true })))
      .pipe(gulp.dest('./deploy/'));
  </code></pre>