vojtajina/grunt-npm — pull request #5 by Xiphe (2014-11-28 10:27:32+00:00)
Title: Make customizable

including / follow up PR #4

I'd like to spread contributors into `author`, `maintainers` and `contributors` fields.

With this changes i'm able to add multiple tasks filtering multiple parts of the contributor list into different keys in my package.json

Example:
```js
'npm-contributors': {
bower: {
options: {
file: 'bower.json',
commitMessage: 'update bower authors',
filter: false,
as: 'authors'
}
},
author: {
options: {
file: 'package.json',
commit: false,
filter: function(contributors) {
return contributors[0].name;
},
as: 'author'
}
},
maintainers: {
options: {
file: 'package.json',
commit: false,
filter: function(contributors) {
return contributors.slice(1).filter(function(contributor) {
return contributor.commitCount >= 10;
});
},
as: 'maintainers'
}
},
contributors: {
options: {
file: 'package.json',
commitMessage: 'Update contributors',
filter: function(contributors) {
return contributors.slice(1).filter(function(contributor) {
return contributor.commitCount < 10;
});
}
}
}
}
```