There is a grunt task that does this for you called [grunt-angular-templates](https://github.com/ericclemmons/grunt-angular-templates).