Open WickyNilliams opened 9 years ago
Agreed. I want to do this both for grunt-reduce and it's development loop cousin grunt-livestyle
Thanks, good to know it's a reasonable suggestion.
It might also be nice if globbing was supported:
reduce: {
root : "apps/**"
}
This might come in handy if i had multiple targets that all wanted similar config? Might be breaking the paradigm though - not sure.
Globbing will never work for the root setting. There has to be an authoritative single root that assetgraph can use to determine root relative urls from. So if you want to have several different apps at different roots, a multitask would be the solution
OK, yeah that makes perfect sense
I've managed to get this working as a multitask - would you accept a PR for that?
I've done the absolute bare minimum to convert it, so it's really a small change. I've left the slightly more involved stuff - e.g. setting up the defaults with grunt's this.options(defaults)
- for you to do (there was some logic around defaults i didn't want to risk breaking)
That would be awesome! PR away :tada:
Sweet. I had it mixed in with a load of other changes (i'm working on a dumb fork, that just inlines everything, every time), so i'll isolate, test again and submit as PR
It would be awesome if this allowed you to define multiple reduce tasks (a "multitask" in grunt parlance) like:
then i could run
grunt reduce:appOne
to target a specific build orgrunt reduce
to build them all