The common use of grunt-wiredep is to scan through your given HTML and inject the relevant dependencies into that HTML.
I'm looking to instead get the JS & CSS dependencies, in the order as determined by wiredep, concat them into a single JS and single CSS file and write those files.
I can see that wiredep itself is happy to return an object with an ordered list but the syntax for getting Grunt to write these into files is beyond me.
Does anyone know if this is possible and what the syntax would be? The first thing that all grunt-wiredep tasks start with is a source HTML file and that's not what I'm looking to do.
Any advice appreciated!
So the way I finally overcame this with a colleague is remarkably simple.
I set up a new Grunt task to get the object I needed from the node Wiredep process as here:
The
grunt.config.set()
allows you to set a task's source outside of it's config block.