In my gruntfile I've defined an array of javascript files I need to insert into the index, they include dependencies (jquery and etc) plus the files that make up my angular app (controllers, services, etc).
This array I use in a task which combines them and minifies them so that I have one single final js file, which is good for production but for dev work I'd prefer the files to be inserted individually for easier debugging.
Is there a grunt plugin which would allow me to:
- insert each script from the array separately into the index
- insert the minified script into the index
- easily switch between the two, such that I don't need to go in and manually delete each script and then add the minified script, thus I could insert the full scripts in the task that builds for dev and insert the concatenated scripts in the build for prod task.
I've found a few plugins (fileblocks and injector) which would seem to do what I want but I couldn't get them to work so if you could also provide an example of how to configure the plugin for the build dev and build prod tasks.