Skip to content
Permalink
Browse files

Grunt: Use grunt-git-authors plugin to generate authors list.

  • Loading branch information
scottgonzalez committed Jul 5, 2012
1 parent be58dcf commit 7716c3d46116722b7d6b4cc5470956f203376b7f
Showing with 2 additions and 24 deletions.
  1. +0 −24 build/tasks/build.js
  2. +1 −0 grunt.js
  3. +1 −0 package.json
@@ -185,28 +185,4 @@ grunt.registerTask( "clean", function() {
require( "rimraf" ).sync( "dist" );
});

grunt.registerTask( "authors", function() {
var done = this.async();

grunt.utils.spawn({
cmd: "git",
args: [ "log", "--pretty=%an <%ae>" ]
}, function( err, result ) {
if ( err ) {
grunt.log.error( err );
return done( false );
}

var authors,
tracked = {};
authors = result.split( "\n" ).reverse().filter(function( author ) {
var first = !tracked[ author ];
tracked[ author ] = true;
return first;
}).join( "\n" );
grunt.log.writeln( authors );
done();
});
});

};
@@ -85,6 +85,7 @@ grunt.loadNpmTasks( "grunt-css" );
grunt.loadNpmTasks( "grunt-html" );
grunt.loadNpmTasks( "grunt-compare-size" );
grunt.loadNpmTasks( "grunt-junit" );
grunt.loadNpmTasks( "grunt-git-authors" );
// local testswarm and build tasks
grunt.loadTasks( "build/tasks" );

@@ -57,6 +57,7 @@
"grunt-compare-size": "0.1.4",
"grunt-html": "0.1.1",
"grunt-junit": "0.1.4",
"grunt-git-authors": "1.0.0",
"request": "2.9.153",
"rimraf": "2.0.1",
"testswarm": "0.2.3"

0 comments on commit 7716c3d

Please sign in to comment.
You can’t perform that action at this time.