Skip to content

Commit 6b1fea9

Browse files
committed
Grunt: Added task for generating the list of authors.
1 parent d4318a5 commit 6b1fea9

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

grunt.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,30 @@ grunt.registerTask( "clean", function() {
572572
require( "rimraf" ).sync( "dist" );
573573
});
574574

575+
grunt.registerTask( "authors", function() {
576+
var done = this.async();
577+
578+
grunt.utils.spawn({
579+
cmd: "git",
580+
args: [ "log", "--pretty=%an <%ae>" ]
581+
}, function( err, result ) {
582+
if ( err ) {
583+
grunt.log.error( err );
584+
return done( false );
585+
}
586+
587+
var authors,
588+
tracked = {};
589+
authors = result.split( "\n" ).reverse().filter(function( author ) {
590+
var first = !tracked[ author ];
591+
tracked[ author ] = true;
592+
return first;
593+
}).join( "\n" );
594+
grunt.log.writeln( authors );
595+
done();
596+
});
597+
});
598+
575599
grunt.registerTask( "default", "lint csslint htmllint qunit" );
576600
grunt.registerTask( "sizer", "concat:ui min:dist/jquery-ui.min.js compare_size:all" );
577601
grunt.registerTask( "sizer_all", "concat:ui min compare_size" );

0 commit comments

Comments
 (0)