My current workflow involves using grunt
to construct a javascript/angularjs
project with the tasks organized as follows:
clean copy > uglify > cssmin
.
However, whenever I make changes to a js
file, I find myself manually appending a version increment at the end of the script tag in order for the browser to recognize the modifications.
<script src="/js/myscript?v123"></script>
My question is: How can I streamline this process by utilizing grunt
? Ideally, when I execute the "grunt" command, only the files that have been altered since the last run should receive a version increment. This way, the browser can reuse cached files to maximize efficiency.