public
Last active

  • Download Gist
git-contributors.js
JavaScript
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
/*
* As seen in:
* https://github.com/superlukas/grunt-git-contributors/blob/master/tasks/git-contributors.js
*
* I tried this directly in node, too.
* Pipes may work, haven't tried it yet.
* I could include a shell script or
* use something like git-extras, but
* that doesn't feel right either.
*/
 
module.exports = function (grunt) {
'use strict';
 
grunt.registerTask('foo', 'bar', function () {
var done = this.async(),
path = require('path');
 
grunt.util.spawn({
cmd: 'git',
args: ['--no-pager', '--git-dir', path.join(process.cwd(), '.git'), 'shortlog', '-s', '-n', '-e']},
function (error, result, code) {
// For some reason this code is never executed.
grunt.log.writeln('You\'ll never see this ouput.');
done(code === 0);
});
});
 
};

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.