Skip to content

Commit 7716c3d

Browse files
committed
Grunt: Use grunt-git-authors plugin to generate authors list.
1 parent be58dcf commit 7716c3d

File tree

3 files changed

+2
-24
lines changed

3 files changed

+2
-24
lines changed

build/tasks/build.js

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -185,28 +185,4 @@ grunt.registerTask( "clean", function() {
185185
require( "rimraf" ).sync( "dist" );
186186
});
187187

188-
grunt.registerTask( "authors", function() {
189-
var done = this.async();
190-
191-
grunt.utils.spawn({
192-
cmd: "git",
193-
args: [ "log", "--pretty=%an <%ae>" ]
194-
}, function( err, result ) {
195-
if ( err ) {
196-
grunt.log.error( err );
197-
return done( false );
198-
}
199-
200-
var authors,
201-
tracked = {};
202-
authors = result.split( "\n" ).reverse().filter(function( author ) {
203-
var first = !tracked[ author ];
204-
tracked[ author ] = true;
205-
return first;
206-
}).join( "\n" );
207-
grunt.log.writeln( authors );
208-
done();
209-
});
210-
});
211-
212188
};

grunt.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ grunt.loadNpmTasks( "grunt-css" );
8585
grunt.loadNpmTasks( "grunt-html" );
8686
grunt.loadNpmTasks( "grunt-compare-size" );
8787
grunt.loadNpmTasks( "grunt-junit" );
88+
grunt.loadNpmTasks( "grunt-git-authors" );
8889
// local testswarm and build tasks
8990
grunt.loadTasks( "build/tasks" );
9091

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
"grunt-compare-size": "0.1.4",
5858
"grunt-html": "0.1.1",
5959
"grunt-junit": "0.1.4",
60+
"grunt-git-authors": "1.0.0",
6061
"request": "2.9.153",
6162
"rimraf": "2.0.1",
6263
"testswarm": "0.2.3"

0 commit comments

Comments
 (0)