iammerrick / grunt-parallel

Speed up your build by running commands and tasks in parallel!
MIT License
170 stars 24 forks source link

Real time console logging? #1

Closed OliverJAsh closed 11 years ago

OliverJAsh commented 11 years ago

I have a situation where I would like to run two tasks in parallel, but I want them to display their output as they are happening.

My actual situation is two watch tasks (different tasks completely) that I need to run in parallel.

OliverJAsh commented 11 years ago

Read the lib code and realised that the task options just get sent to grunt.util.spawn, so it's possible like this:

parallel: {
  run: [{
    grunt: true,
    args: ['hubWatch'],
    opts: { stdio: 'inherit' }
  }, {
    grunt: true,
    args: ['start'],
    opts: { stdio: 'inherit' }
  }]
}

So the crux is opts: { stdio: 'inherit' }.

iammerrick commented 11 years ago

Does this mix the tasks out? Showing them at the same time rendering the output less useful?

OliverJAsh commented 11 years ago

It does, but seeing as the tasks I need to run are ongoing processes (watch tasks), I need to see the output of their child processes.