Skip to content
This repository has been archived by the owner on Mar 26, 2018. It is now read-only.

getting the name of the collection in the json #22

Open
newtonianb opened this issue Feb 5, 2014 · 3 comments
Open

getting the name of the collection in the json #22

newtonianb opened this issue Feb 5, 2014 · 3 comments

Comments

@newtonianb
Copy link

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);
@eddiemonge
Copy link
Member

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

@eddiemonge
Copy link
Member

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

@eddiemonge eddiemonge reopened this Aug 7, 2014
@eddiemonge
Copy link
Member

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
  }
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants