title: gulp, usemin and requireJS
body: <p>I am using <a href="https://www.npmjs.org/package/gulp-usemin" rel="nofollow">gulp-usemin</a> to minify and concat CSS and JS files and rename the references in the index.html. But my project also uses requireJS to load AMD modules from multiple files that are not referenced directly in the index.html and are not concatenated with the rest. </p>
  
  <pre><code>&lt;!-- build:js js/app.js --&gt;
  &lt;script src="js/libs/accounting.js"&gt;&lt;/script&gt;
  &lt;script src="js/libs/farbtastic.js"&gt;&lt;/script&gt;
  &lt;script src="js/libs/lz-string-1.3.3.js"&gt;&lt;/script&gt;
  &lt;script src="js/libs/color.js"&gt;&lt;/script&gt;
  &lt;script data-main="js/main" src="js/libs/require.js"&gt;&lt;/script&gt;
  &lt;!-- endbuild --&gt;
  </code></pre>
  
  <p>How do I combine usemin with some other gulp plugin to make the requireJS files part of the output? The answer will probably contain something like <a href="https://www.npmjs.org/package/amd-optimize" rel="nofollow">amd-optimize</a> but I do not understand yet how to combine this with gulp-usemin. </p>