Skip to content
This repository has been archived by the owner on Mar 26, 2018. It is now read-only.

Commit

Permalink
remove redundant output when expanding files
Browse files Browse the repository at this point in the history
  • Loading branch information
ambar committed Apr 9, 2016
1 parent c7feb0c commit c8f63cc
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions tasks/filerev.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ var convert = require('convert-source-map');

module.exports = function (grunt) {
grunt.registerMultiTask('filerev', 'File revisioning based on content hashing', function () {
var done = this.async();
var revvedFilesCount = 0;
var target = this.target;
var filerev = grunt.filerev || {summary: {}};
var options = this.options({
Expand Down Expand Up @@ -110,12 +112,16 @@ module.exports = function (grunt) {
}
});

grunt.log.writeln('Revved ' + chalk.cyan(el.src.length) + ' ' +
(el.src.length === 1 ? 'file' : 'files')
);
revvedFilesCount += el.src.length;

next();
}, this.async());
}, function () {
grunt.log.writeln('Revved ' + chalk.cyan(revvedFilesCount) + ' ' +
(revvedFilesCount === 1 ? 'file' : 'files')
);

done();
});

grunt.filerev = filerev;
});
Expand Down

0 comments on commit c8f63cc

Please sign in to comment.