title: gulp-useref build concat scripts and css but doesn't replace <--! build --> in html
body: <p>I use <code>gulp-usref</code>, <code>gulp-if</code>, <code>gulp-uglify</code>, <code>gulp-csso</code> and <code>gulp-file-include</code> to build my app.
  Everything works fine in build except HTML stays as it was. My gulp file is set like this:</p>
  
  <pre><code>gulp.task('html', ['diststyles', 'scripts'], function () {
  var assets = $.useref.assets();
  
  return gulp.src('app/*.html')
      .pipe(assets)
      .pipe(gulpif('*.js', uglify()))
      .pipe(gulpif('*.css', minifyCss()))
      .pipe(assets.restore())
      .pipe(useref())
      .pipe(gulp.dest('dist'))
      .pipe($.size());
  });
  </code></pre>
  
  <p>diststyles and scripts are set like this:</p>
  
  <pre><code>gulp.task('diststyles', function () {
  return gulp.src('app/styles/scss/*.scss')
      .pipe($.sass({
          errLogToConsole: true,
          includePaths: ['app/bower_components/foundation/scss'],
      }))
      .pipe($.autoprefixer('last 2 version'))
      .pipe(gulp.dest('app/styles'))
      .pipe(reload({stream:true}))
      .pipe($.size())
      .pipe($.notify("Compilation complete."));
  });
  
  gulp.task('scripts', function () {
  return gulp.src('app/scripts/**/*.js')
      .pipe($.jshint())
      .pipe($.jshint.reporter(require('jshint-stylish')))
      .pipe($.size());
  });
  </code></pre>
  
  <p>the file structure I use is this:</p>
  
  <pre><code>root
  +-- app
      +-- bower_components
      +-- components
          header.html
          footer.html
      +-- pages
          home.html
      +-- scripts
          main.js
      +-- svg
  +-- dist
      +-- scripts
          +-- vendor
              modernizr.js
          main.js
          plugins.js
          vendor.js
      +-- styles
          main.css
      home.html
  </code></pre>
  
  <p>When I run gulp first I include components into html pages (ina pages folder) and copy them to app folder. form app folder (after include is done) html tast starts. I got all my js and css files concated and copied to dist as it should be, But in html file it rests like this:</p>
  
  <pre><code>&lt;!-- build:css({.tmp,app}) styles/menu.css --&gt;
  &lt;link rel="stylesheet" href="styles/menu.css"&gt;
  &lt;link rel="stylesheet" href="styles/fonts.css"&gt;
  &lt;!-- endbuild --&gt;`
  </code></pre>
  
  <p>Any ideas what caused the problem and how to resolve this?</p>