Zaonce...
loading...

This Planet is a Tedious Place...

01/10/15 Clear terminal history when using grunt taskrunner

On my current project, we're using grunt to watch for changed files and automatically rerun our unit tests. This works great, but when there are lots of broken tests, it's a pain to have to scroll back up the output window to find the first failure.

To make this easier, you can create a grunt task that clears the window and run this first:

    
grunt.registerTask( 'clear', function()
{
grunt.log.write( "\x1bc\x1b[3J" );
} );


The above works for Terminal.app in OSX - you might need to change the escape codes to make it work in other shells/terminals.

posted by Gruntfuggly # 14:28 2 comments

[*][/*]

Somebody # 15/10/15 16:40


Hola que hace loca

Somebody # 05/11/15 17:46



Somebody # 03/12/24 12:15

 

Add Comment