grunt-filerev icon indicating copy to clipboard operation
grunt-filerev copied to clipboard

getting the name of the collection in the json

Open newtonianb opened this issue 11 years ago • 3 comments

We are looking for the best way to get the name of the actual collection/grunt task in the json output so what we are looking for in the json is something like this.

{
  collection_one: [
    "source " : "destination"
  ]
}

instead of

{
    "source " : "destination"
}

We found a way to accomplish this by editing the filerev source but we don't like this idea. Would there happen to be a trick or different library we could use to accomplish this?

if (filerev.summary[el.collection] === undefined) {filerev.summary[el.collection] = {};}
filerev.summary[el.collection][path.normalize(file)] = path.join(dirname, newName);

newtonianb avatar Feb 05 '14 23:02 newtonianb

can you explain that a bit? or what you are trying to accomplish with this?

eddiemonge avatar Mar 20 '14 17:03 eddiemonge

@newtonianb ^^ Could you maybe do a PR with that change with accompanying tests?

eddiemonge avatar May 07 '14 02:05 eddiemonge

Ok reopening this because I can see value in it. Closed it initially due to lack of feedback.

{
  collection_one: {
    "source " : "destination",
    "config: : { options from the grunt config for this task
  }
}

eddiemonge avatar Aug 07 '14 18:08 eddiemonge