I try to DRY my gulpfile. There I have small duplication of code I not comfortable with. How can this be made better?
gulp.task('scripts', function() {
  return gulp.src('src/scripts/**/*.coffee')
    .pipe(coffeelint())
    .pipe(coffeelint.reporter())
    .pipe(coffee())
    .pipe(gulp.dest('dist/scripts/'))
    .pipe(gulp.src('src/index.html'))  // this
    .pipe(includeSource())             // needs
    .pipe(gulp.dest('dist/'))          // DRY
});
gulp.task('index', function() {
  return gulp.src('src/index.html')
    .pipe(includeSource())
    .pipe(gulp.dest('dist/'))
});
I got index as a separate task, since I need to watch src/index.html to livereload. But I'm also watching my .coffee sources and when they change, I need to update src/index.html as well.
How can I pipe to index in scripts?
 
     
     
     
    