title: How to automate javascript version increment if file changed?
body: <p>I'm using <code>grunt</code> to build a <code>javascript/angularjs</code> project in the following order:</p>
  
  <p><code>clean copy &gt; uglify &gt; cssmin</code>.</p>
  
  <p>Now if I change a <code>js</code> file I'd always have to manually add a version increment at the end of the script tag, so that the browser can detect the changes.</p>
  
  <pre><code>&lt;script src="/js/myscript?v123"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>Question: how can I automate this process using <code>grunt</code>? If I run the "grunt" command, only files that changed compared to the last run should get a version increment. So that the browser can reuse the cached files as much as possible.</p>