Q:

change url path in js file during copy (angular, grunt, grunt-rebase)

Im currently building a project that contains foundationApps in it which is based on angular. In the directives there are calls to template paths like so 
 templateUrl: 'components/accordion/accordion.html',

Im using grunt at the moment to copy the files over but with the path being as above all of the components are being moved to the root of the project for it to work without refracting.
Can I use grunt-rebase to change this link or is there another tool in the grunt collection to do it or that can do it better then manually changing the files each time I update

A:

I normally use the html2js package to compile all my templates into a js file instead of moving the original files. It puts all the templates into the Angular $templateCache service.
Personally I've only used it with gulp but here's a Grunt package:
https://github.com/karlgoldstein/grunt-html2js

