Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run Grunt silent / not verbose

How to run Grunt more silent?

I don't have the --verbose option on. Still I get a long log.

I would like to have a shorter log, ideally just log the failed specs.

Any suggestion?

I am using grunt-karma and Jasmine

like image 420
Rikard Avatar asked Oct 02 '22 10:10

Rikard


1 Answers

update After some discussions in comments below I think you could do something like:

grunt test | grep should\|Expected > logs.txt

This way you'll get only the lines containing "should" or "Expected" in the log file. Adapt this expression to match the lines you want to keep.


My first answer was:

Just redirect the output

Assuming your task is named 'test'

  • under OS X / Linux:

    grunt test > /dev/null
    
  • under windows command line:

    grunt test > NUL
    
like image 127
Pascal Le Merrer Avatar answered Oct 05 '22 13:10

Pascal Le Merrer