8

Here's an example GruntFile for a "clean" task (using the grunt-contrib-clean plugin):

clean: {
            dry: {
                src: ["build/css"],
                options: {
                    'no-write': true
                }
            }
        }

Running grunt clean:dry would output:

Running "clean:dry" (clean) task
>> 2 paths cleaned.

Done, without errors.

Using grunt clean:dry -v, gives me what I want:

Running "clean:dry" (clean) task
Not actually cleaning live/css...
Not actually cleaning live/js...

...but it also displays a bunch of configuration logs that have nothing to do with the current task. Can I use the --verbose flag (or something else) to show the full output of a task without having to scroll through all of the non-related config logs?

PS: My other plugins suffer from the same problem, displaying only a single line of output when their documentation indicates that I should expect more.

(Related questions: Logging from grunt-contrib-jasmine and How can I force JSHint running in grunt to always use the --verbose flag do not answer this question).

Community
  • 1
  • 1
Stevethemacguy
  • 708
  • 7
  • 22
  • 1
    Not as far as I know. Some individual plugins have an option to output more info, but if you use a CLI option it gets passed to all plugins, thus all of them would be "verbose". – Jordan Kasper Jan 15 '15 at 13:02
  • Thanks for the quick feedback. I'm surprised that this can't be done, but the global --verbose will work for now. – Stevethemacguy Jan 17 '15 at 00:21

1 Answers1

0

There are some insights into this.

grunt.initConfig({
    verbosity: {
        default: {
            options: { mode: 'dot' }, // normal, oneline, dot, hidden
            tasks: ['groundskeeper', 'requirejs']
        }
    }
grunt.registerTask( '_start',  ['verbosity:default', 'projectInfo'] );
Abhijeet
  • 8,561
  • 5
  • 70
  • 76