title: Replace string in a single file using gulp
body: <p>I’m using a single task to generate css files from sass plus strip comments, create a source map and minify. I'm trying to replace a string in theme.components-md.scss file.</p>
  
  <p>Here’s my attempt:</p>
  
  <pre><code>var gulp = require('gulp'),
      sass = require('gulp-ruby-sass'),
      sourceMaps = require('gulp-sourcemaps'),
      minifyCss = require('gulp-minify-css'),
      replace = require('gulp-replace'),
      filter = require('gulp-filter');
  
  gulp.task('vendor:css', function() {
      var themeComponentsFilter = filter('theme.components-md.scss');
      return sass('resources/assets/sass/')
          .pipe(stripComments({
              safe: false
          }))
          .pipe(themeComponentsFilter)
          .pipe(replace(/..\/img\//g, '../../img/vendor/'))
          .pipe(themeComponentsFilter.restore())
          .pipe(sourceMaps.init())
          .pipe(minifyCss())
          .pipe(sourceMaps.write('/', {
              sourceMappingURLPrefix: 'http://core.dev/css/vendor'
          }))
          .pipe(gulp.dest('public/css/vendor'));
  });
  </code></pre>
  
  <p>But it's not working.</p>