Skip to content

Commit

Permalink
Less verbose output
Browse files Browse the repository at this point in the history
Files created are logged on verbose
  • Loading branch information
Crisci, Fabio | Piuccio | TRVDD committed Jul 9, 2014
1 parent eb9e74d commit 4944e2c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tasks/uglify.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,10 @@ module.exports = function(grunt) {
// Write source map
if (options.sourceMap) {
grunt.file.write(options.generatedSourceMapName, result.sourceMap);
grunt.log.writeln('File ' + chalk.cyan(options.generatedSourceMapName) + ' created (source map).');
grunt.verbose.writeln('File ' + chalk.cyan(options.generatedSourceMapName) + ' created (source map).');
}

grunt.log.writeln('File ' + chalk.cyan(f.dest) + ' created: ' +
grunt.verbose.writeln('File ' + chalk.cyan(f.dest) + ' created: ' +
maxmin(result.max, output, options.report === 'gzip'));
});
});
Expand Down

4 comments on commit 4944e2c

@roncli
Copy link

@roncli roncli commented on 4944e2c Aug 19, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm considering doing a PR that adds an option that outputs the maxmin result to log instead of requiring --verbose to be able to see the output. @piuccio, what would your preference on a default for that option be?

@piuccio
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @roncli
Everything started from gruntjs/grunt-contrib-imagemin#236 and #75, initially the idea was to keep the default behavior and add a silent: true option to use grunt.verbose instead of grunt.log. You can check the discussion (short) of that PR.

I'm fine reverting to the default behavior as long as there's an option to make it silent, I have way too many files in my project.

Let's see what @sindresorhus has to say on this.

@sindresorhus
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nah, not interested in more options.

@meschbach
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change appears to be the root cause of issue #254, bringing the documentation and user expectations out of sync with the code.

Please sign in to comment.