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

Commit c8f63cc

Browse files
committed
remove redundant output when expanding files
1 parent c7feb0c commit c8f63cc

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

tasks/filerev.js

+10-4
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ var convert = require('convert-source-map');
88

99
module.exports = function (grunt) {
1010
grunt.registerMultiTask('filerev', 'File revisioning based on content hashing', function () {
11+
var done = this.async();
12+
var revvedFilesCount = 0;
1113
var target = this.target;
1214
var filerev = grunt.filerev || {summary: {}};
1315
var options = this.options({
@@ -110,12 +112,16 @@ module.exports = function (grunt) {
110112
}
111113
});
112114

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

117117
next();
118-
}, this.async());
118+
}, function () {
119+
grunt.log.writeln('Revved ' + chalk.cyan(revvedFilesCount) + ' ' +
120+
(revvedFilesCount === 1 ? 'file' : 'files')
121+
);
122+
123+
done();
124+
});
119125

120126
grunt.filerev = filerev;
121127
});

0 commit comments

Comments
 (0)