8

I'm using Angular CLI 9.0.3 on Windows 10, inside the standard Windows command prompt, to run ng build.

When there are errors reported in the command prompt, it can be difficult to determine how far back to scroll in order to see the first error in the current compilation.

Using MacOS it's possible to use Command-k to clear the terminal while it's running, but to my knowledge the Windows requires you to stop the service then use cls to clear the command prompt.

Is there a way to clear the terminal automatically each time the app compiles, so that I can scroll to the top of the command window to see the first error?

Stephen Lead
  • 1,904
  • 5
  • 23
  • 46

1 Answers1

1

I had the exact same problem, except I was using Windows Terminal instead of the standard command prompt.

I was under the assumption that while ng build was running, the terminal would not listen for keystrokes and therefore it would have to be an option built into the ng cli. But reading your comment about it being possible in MacOS with Command-k gave me hope.

So, I just confirmed that in Windows Terminal there is a clear buffer command that is available in the Command Palette, and you can assign a keyboard shortcut to it in the settings.

Windows Terminal continues to pleasantly surprise me like this.

marvhen
  • 314
  • 1
  • 3
  • 13