title: Grunt-usemin and revved files - dirs option
body: <p>I have a problem with <code>grunt-usemin</code> plugin.</p>
  
  <p>Basically, I want to put all my static content in <code>static/</code> directory under <code>app</code> or <code>dist</code> (depends if the application is built or not).</p>
  
  <p>Now, here is my grunt config</p>
  
  <pre><code>useminPrepare: {
    html: ['&lt;%= yeoman.app %&gt;/app.html', '&lt;%= yeoman.app %&gt;/login.html'],
    options: {
      dest: '&lt;%= yeoman.dist %&gt;/static'
    }
  },
  usemin: {
    html: ['&lt;%= yeoman.dist %&gt;/{,*/}*.html'],
    css: ['&lt;%= yeoman.dist %&gt;/static/styles/**/*.css'],
    options: {
      dirs: ['dist/static/']
    }
  }
  </code></pre>
  
  <p>the first part goes ok watching on the output </p>
  
  <pre><code>Found a block:
      &lt;!-- build:css(.tmp) login/styles/main.css --&gt;
      &lt;link rel="stylesheet" href="styles/bootstrap.css"&gt;
      &lt;link rel="stylesheet" href="styles/main.css"&gt;
      &lt;!-- endbuild --&gt;
  Updating config with the following assets:
      - .tmp/styles/bootstrap.css
      - .tmp/styles/main.css
  
  Found a block:
      &lt;!-- build:js({app/static}) login/scripts/libs.js --&gt;
      &lt;script src="bower_components/angular/angular.js"&gt;&lt;/script&gt;
      &lt;!-- endbuild --&gt;
  Updating config with the following assets:
      - {app/static}/bower_components/angular/angular.js
  
  Found a block:
      &lt;!-- build:js({.tmp,app/static}) login/scripts/scripts.js --&gt;
      &lt;script src="scripts/loginApp.js"&gt;&lt;/script&gt;
      &lt;script src="scripts/controllers/login.js"&gt;&lt;/script&gt;
      &lt;!-- endbuild --&gt;
  Updating config with the following assets:
      - {.tmp,app/static}/scripts/loginApp.js
      - {.tmp,app/static}/scripts/controllers/login.js
  
  Configuration is now:
  
    cssmin:
    { 'dist/static/login/styles/main.css': 'dist/static/login/styles/main.css' }
  
    concat:
    { 'dist/static/login/styles/main.css': 
     [ '.tmp/styles/bootstrap.css',
       '.tmp/styles/main.css' ],
    'dist/static/login/scripts/libs.js': [ '{app/static}/bower_components/angular/angular.js' ],
    'dist/static/login/scripts/scripts.js': 
     [ '{.tmp,app/static}/scripts/loginApp.js',
       '{.tmp,app/static}/scripts/controllers/login.js' ] }
  
    uglify:
    { 'dist/static/login/scripts/libs.js': 'dist/static/login/scripts/libs.js',
    'dist/static/login/scripts/scripts.js': 'dist/static/login/scripts/scripts.js' }
  
    requirejs:
    {}
  </code></pre>
  
  <p>but the problem is with swapping normal files with their revved versions, for example, here is html before usemining:</p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;html class="no-js"&gt;
    &lt;head&gt;
      &lt;meta charset="utf-8"&gt;
      &lt;meta http-equiv="X-UA-Compatible" content="IE=edge"&gt;
      &lt;title&gt;Login&lt;/title&gt;
      &lt;meta name="viewport" content="width=device-width"&gt;
      &lt;!-- build:css(.tmp) login/styles/main.css --&gt;
      &lt;link rel="stylesheet" href="styles/bootstrap.css"&gt;
      &lt;link rel="stylesheet" href="styles/main.css"&gt;
      &lt;!-- endbuild --&gt;
  &lt;/head&gt;
    &lt;body ng-app="jsLinkedinConnectorLoginApp"&gt;
      &lt;div class="container" ng-view=""&gt;&lt;/div&gt;
  
      &lt;!-- build:js({app/static}) login/scripts/libs.js --&gt;
      &lt;script src="bower_components/angular/angular.js"&gt;&lt;/script&gt;
      &lt;!-- endbuild --&gt;
  
      &lt;!-- build:js({.tmp,app/static}) login/scripts/scripts.js --&gt;
      &lt;script src="scripts/loginApp.js"&gt;&lt;/script&gt;
      &lt;script src="scripts/controllers/login.js"&gt;&lt;/script&gt;
      &lt;!-- endbuild --&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>and after:</p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;html class="no-js"&gt;
    &lt;head&gt;
      &lt;meta charset="utf-8"&gt;
      &lt;meta http-equiv="X-UA-Compatible" content="IE=edge"&gt;
      &lt;title&gt;Login&lt;/title&gt;
      &lt;meta name="viewport" content="width=device-width"&gt;
      &lt;link rel="stylesheet" href="login/styles/main.css"&gt;
  &lt;/head&gt;
    &lt;body ng-app="jsLinkedinConnectorLoginApp"&gt;
      &lt;div class="container" ng-view=""&gt;&lt;/div&gt;
  
      &lt;script src="login/scripts/libs.js"&gt;&lt;/script&gt;
  
      &lt;script src="login/scripts/scripts.js"&gt;&lt;/script&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>so it is almost right, it seems that grunt does not pick up revved files in <code>dist/static</code> directory.</p>
  
  <p>Now when I move for example <code>dist/static/login</code> directory up, to the <code>dist/login</code> and change <code>dirs</code> to <code>dist</code> everything works fine, so giving subdirectory to <code>dist</code> seems to cause problems.</p>