Is it possible to switch Gulp's output between tasks?
For example, I'd like to run my build
task continuously and see its output by default, and I want to be able to replace build
's output with eslint
's output, but only if such occurs. So, I can see build
's output again, if all offences are corrected.
Seemed pretty straightforward before I started to tinker. Am I missing something?
Select the Task View icon on the taskbar, or press Alt-Tab on your keyboard to see apps or switch between them. To use two or more apps at a time, grab the top of an app window and drag it to the side. Then choose another app and it'll automatically snap into place.
Context switching happens when your schedule is either too full (too many things to work on) or too empty (not enough structure to stay focused). Habits. Most of us have built a habit of task switching through how we use work tools like email or chat. Routines and rituals.
Task output is the data that passes from a task into workflow variables. When you configure a task, you specify the task output values that you want to assign to workflow variables.
Not a proper solution. But here's an idea.
var originalStdoutWrite = process.stdout.write;
process.stdout.write = function(){ return; }
gulp.src(['**/*.js','!node_modules/**'])
.pipe(eslint())
.pipe(eslint.results(results => {
// Called once for all ESLint results.
if(results.errorCount>0){
originalStdoutWrite.call(process.stdout,`Total Results: ${results.length}`);
}else{
process.stdout.write = originalStdoutWrite;
}
}));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With