grunt-update-contributors
Update and commit contributors in JSON files - all developers who commited to the repository, sorted by number of commits.
Based on Vojta Jinas grunt-npm.
Installation
Install npm package, next to your project's Gruntfile.js
file:
npm install grunt-update-contributors --save-dev
Add this line to your project's Gruntfile.js
:
grunt.loadNpmTasks('grunt-update-contributors');
Use
$ grunt update-contributors
or use the 'update-contributors' tasks in other tasks.
Default Configuration
'update-contributors': options: file: 'package.json' commit: true commitMessage: 'Update contributors' as: 'contributors' { // assuming the top commiter is the author, ignore him as a contributor return contributors; }
Multitask
This is a multitask, so we can update multiple files
'update-contributors': bower: options: file: 'bower.json' commitMessage: 'Update bower authors' as: 'authors' filter: false
.mailmap
A .mailmap
file can be used to map multiple emails to a single person.
See git-shortlog#_mapping_authors