nickdodd79 / vscode-gulptasks

A gulp task visualization and execution extension for Visual Studio Code
MIT License
7 stars 6 forks source link

Display output automatically #24

Closed kAlvaro closed 5 years ago

kAlvaro commented 5 years ago

It took me a while to figure out that the extension can actually display task output because the corresponding pane is not displayed automatically. I need to manually display the Output panel and then select Gulp Tasks in the drop-down.

It'd be nice if that could happen automatically.

nickdodd79 commented 5 years ago

Hi @kAlvaro

This will be a simple change. There is a capability on the output channel to 'preserveFocus'.

It is set to not show the output - mainly from an annoyance perspective. I will add a setting that will allow you to specify whether it should focus on the output or not.

New release coming soon with some other stuff and I'll include this.

Nick.

kAlvaro commented 5 years ago

Pretty good news, thank you.

I'm not very familiar with Gulp yet so this may be a silly idea but... Would it make sense to implement three values for such setting?

nickdodd79 commented 5 years ago

I think that'll work - certainly opens more up options than just a true/false alternative.

kAlvaro commented 5 years ago

Sorry for flooding the ticket but perhaps there's room for a fourth value like onError, that would trigger whenever the task fails. I presume Gulp returns a non-zero code in such case (you'll know better than me because the extension already handles that anyway). I believe that whether something is printed to stderr is not necessarily an indicator of failure.

nickdodd79 commented 5 years ago

Yep that works well. I've added when a task starts, completes and errors. Every time a message is emitted when a task is in progress. And then the never option.

stone821 commented 5 years ago

I like this feature, too. When do you release the newest version?

At the moment, I open the Output panel, run a gulp task, then don't output anything in the panel.

Thanks for your hard work.

nickdodd79 commented 5 years ago

Hi @stone821

I have put this in place now. It highlighted a slight misalignment with output messages and using gulp.watch, which I have attempted to fix - just testing.

I plan on releasing v1.3.0 over the next few days.

Nick.

nickdodd79 commented 5 years ago

After some testing I couldn't seem to break anything so published. You can now find a new configuration setting to control the output displaying in v1.3.0.

kAlvaro commented 5 years ago

Nicely designed change, thank you very much. BTW, the two first descriptions are swapped:

      "enum": [
        "Task Starts",
        "Task Progress",
        "Task Completes",
        "Task Errors",
        "Never"
      ],
      "enumDescriptions": [
        "When a task outputs progress (every message)",
        "When a task starts",
        "When a task finishes or errors",
        "When a task errors",
        "Never"
      ],
nickdodd79 commented 5 years ago

That'll be the last minute change I did and clearly didn't check it all over. Thanks for the spot. I have released v1.3.1 with a correction.