title: nodejs / grunt usemin plugin
body: <p>I'm using yeoman and grunt to build my project and grunt-css plugin for using 'cssmin' instead of 'css' built-in with grunt.js</p>
  
  <h2>index.html</h2>
  
  <pre><code>&lt;!-- build:css styles/styles.css --&gt;
  &lt;link rel="stylesheet" href="styles/main.css"/&gt;
  &lt;!-- endbuild --&gt;
  
  &lt;!-- build:js scripts/scripts.js --&gt;
  &lt;script src="scripts/vendor/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script src="scripts/vendor/handlebars-1.0.0.beta.6.js"&gt;&lt;/script&gt;
  &lt;script src="scripts/vendor/ember-1.0.pre.min.js"&gt;&lt;/script&gt;
  &lt;script src="scripts/main.js"&gt;&lt;/script&gt;
  &lt;script src="scripts/routes/app-router.js"&gt;&lt;/script&gt;
  &lt;script src="scripts/store.js"&gt;&lt;/script&gt;
  &lt;script src="scripts/controllers/application-controller.js"&gt;&lt;/script&gt;
  &lt;script src="scripts/models/application-model.js"&gt;&lt;/script&gt;
  &lt;script src="scripts/views/application-view.js"&gt;&lt;/script&gt;
  &lt;!-- endbuild --&gt;
  </code></pre>
  
  <h2>Gruntfile.js</h2>
  
  <pre><code>rev: {
        js: 'dist/scripts/**/*.js', // scripts/**/*.js
        css: 'dist/styles/**/*.css', // styles/**/*.css
        img: 'dist/images/**' // images/**
  },
  'usemin-handler': {
        html: 'index.html'
  },
  usemin: {
        html: ['dist/**/*.html'], // **/*.html
        css: ['dist/**/*.css'] // **/*.css
  },
  rjs: {
        // no minification, is done by the min task
        optimize: 'none',
        baseUrl: './scripts',
        wrap: true
  },
  cssmin: {
        dist: {
          src: [
            'app/styles/**/*.css'
          ],
          dest: 'dist/styles/styles.css'
        }
  },
  concat: {
        dist: {
          src: [
            'app/scripts/**/*.js'
          ],
          dest: 'dist/scripts/scripts.js',
          separator: '/**********/\n'
        }
  },
  min: {
        dist: {
          src: [
            'dist/scripts/scripts.js'
          ],
          dest: 'dist/scripts/scripts.js',
          separator: '/**********/\n'
        }
  }
  </code></pre>
  
  <p>Then the build project structure is:</p>
  
  <pre><code>dist/
  |__scripts/
  |____04216377.scripts.js
  |__styles/
  |____d41d8cd9.styles.css
  |__index.html
  </code></pre>
  
  <h2>Then output index.html file</h2>
  
  <pre><code>&lt;link rel="stylesheet" href="styles/styles.css"/?&gt;
  
  &lt;script src="scripts/04216377.scripts.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>As you see all went OK except renaming the revisioned styles in index.html that should be <strong>'styles/d41d8cd9.styles.css
  Anyone knows why?
  And is the questionmark '?' in the  line normal???</strong></p>
  
  <hr>
  
  <p>Note: for more information this is outputted in my console (no errors)
  Running "rev:js" (rev) task
  dist/scripts/scripts.js --- 04216377.scripts.js</p>
  
  <p>Running "rev:css" (rev) task
  dist/styles/styles.css --- d41d8cd9.styles.css</p>
  
  <p>Running "rev:img" (rev) task</p>
  
  <p>Running "usemin:html" (usemin) task</p>
  
  <p>usemin:html - dist/index.html
  scripts/scripts.js</p>
  
  <pre><code>was &lt;script src="scripts/scripts.js"&gt;&lt;/script&gt;
  now &lt;script src="scripts/04216377.scripts.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>Running "usemin:css" (usemin) task</p>
  
  <p>usemin:css - dist/styles/d41d8cd9.styles.css</p>
  
  <p><strong>And no renaming has been done!
  Thanks a lot guys!</strong></p>