Closed ChrisWren closed 11 years ago
+1 Severely needed! I can't see my coffee compilation errors and vogue messages!
+1 It's usefull with long running tasks (watch/server)
Would love to merge this in if we could make it opt-in via an option?
I also needed this a few days back and added it to my local copy borrowing @ChrisWren's idea. I've just made a fork so you can check this commit if you want to see my approach: https://github.com/netoholic/grunt-parallel/commit/ef7985f6d709de118f74c55e2c6c11ff647f1c2d
Edit: I am pretty sure my solution is not universal, but it gets the job done for my use case. Running watch, server and a few other tasks.
Added support for this...
grunt.initConfig({
stream: {
options: {
stream: true
},
tasks: [{ cmd: 'tail', args: ['-f', '/var/log/system.log']}]
}
});
Thanks guys!
Is it tested on windows? I get a "Warning: Cannot set property 'stdio' of undefined Use --force to continue." and I checked "task.opts" remain undefined even after the "task.opts = task.opts || {};".
@guillaume86 Could you post your parallel configuration?
nothing fancy:
parallel:
dev:
#options:
# stream: true
grunt: true
tasks: ['watch', 'server', 'reload']
For this version I moved the grunt option into the options hash... So change it too:
parallel:
dev:
options:
stream: true
grunt: true
tasks: ['watch', 'server', 'reload']
Great, I'll switch back to the official version.
Thx, problem solved :)
The grunt.utils.spawn function has an option for a child process to inherit the standard input and output of its parent process. By using this option, output from the child tasks will be logged in the terminal.
This is helpful for tasks like
watch
where you want to see what the task is outputting.