Skip to content

Commit 0d2f331

Browse files
The Half Blood Princevladikoff
authored andcommitted
Used grunt.verbose to show detailed logging (#419) r=vladikoff
Used grunt.verbose to show detailed logging only for verbose mode. Added a note about quiet run Fixed incorrect commit Added the same for source maps Fix for jsHint errors Removed unused function Removed newline
1 parent c3dae35 commit 0d2f331

File tree

2 files changed

+4
-17
lines changed

2 files changed

+4
-17
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,8 @@ grunt.initConfig({
513513
}
514514
});
515515
```
516+
#### Quiet Mode
517+
By default the task supresses the logging, use _--verbose_ to show the full output.
516518

517519

518520
## Release History

tasks/uglify.js

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,6 @@ function relativePath(file1, file2) {
2424
return '';
2525
}
2626

27-
function reportFacility( grunt, options ){
28-
var reporter;
29-
switch( options.report ){
30-
case 'none':
31-
reporter = grunt.verbose;
32-
break;
33-
default:
34-
case 'min':
35-
case 'gzip':
36-
reporter = grunt.log;
37-
}
38-
return reporter;
39-
}
40-
4127
// Converts \r\n to \n
4228
function normalizeLf(string) {
4329
return string.replace(/\r\n/g, '\n');
@@ -64,7 +50,6 @@ module.exports = function(grunt) {
6450
screwIE8: false,
6551
quoteStyle: 0
6652
});
67-
var log = reportFacility( grunt, options );
6853

6954
// Process banner.
7055
var banner = normalizeLf(options.banner);
@@ -182,12 +167,12 @@ module.exports = function(grunt) {
182167
// Write source map
183168
if (options.sourceMap) {
184169
grunt.file.write(options.generatedSourceMapName, result.sourceMap);
185-
log.writeln('File ' + chalk.cyan(options.generatedSourceMapName) + ' created (source map).');
170+
grunt.verbose.writeln('File ' + chalk.cyan(options.generatedSourceMapName) + ' created (source map).');
186171
createdMaps++;
187172
}
188173

189174
var outputSize = maxmin(result.max, output, options.report === 'gzip');
190-
log.writeln('File ' + chalk.cyan(f.dest) + ' created: ' + outputSize);
175+
grunt.verbose.writeln('File ' + chalk.cyan(f.dest) + ' created: ' + outputSize);
191176

192177
createdFiles++;
193178
});

0 commit comments

Comments
 (0)