From 7716c3d46116722b7d6b4cc5470956f203376b7f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Scott=20Gonz=C3=A1lez?= Date: Thu, 5 Jul 2012 14:34:15 -0400 Subject: [PATCH] Grunt: Use grunt-git-authors plugin to generate authors list. --- build/tasks/build.js | 24 ------------------------ grunt.js | 1 + package.json | 1 + 3 files changed, 2 insertions(+), 24 deletions(-) diff --git a/build/tasks/build.js b/build/tasks/build.js index 51c2fefdb..06a4b98a2 100644 --- a/build/tasks/build.js +++ b/build/tasks/build.js @@ -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(); - }); -}); - }; \ No newline at end of file diff --git a/grunt.js b/grunt.js index 8ec70c647..a861be2e0 100644 --- a/grunt.js +++ b/grunt.js @@ -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" ); diff --git a/package.json b/package.json index ebff55a86..5053d23d5 100644 --- a/package.json +++ b/package.json @@ -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" -- 2.39.5