You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey! Glad you're enjoying mask. just was one of my inspirations :)
So one option you have available is starting all your commands with bash in the background using &.
Here's a simple example:
## runall~~~bash$MASK run server &$MASK run client &$MASK run database
~~~
However, this gets a bit tricky... exiting mask will not close these background processes for you. There's ways to handle these background tasks like using bash traps but it becomes pretty verbose in my experience.
I personally would love a rust-based version of concurrently which is what I usually use for node projects. It's been on my todo list for awhile to make a rust version of that, but i'm not sure it directly falls into the scope of mask.
I'd want someone to build a cli/lib separately first, and then integrate that into mask so we can run tasks in parallel without users having to install another tool manually.
## runall
~~~bash
$MASK run server & $MASK run client & $MASK run database & wait
~~~
However, this gets a bit tricky... exiting mask will not close these background processes for you. There's ways to handle these background tasks like using bash traps but it becomes pretty verbose in my experience.
For handling this case it's better to start another bash process inside bash process.
~~~bash
bash -c '$MASK run server & $MASK run client & $MASK run database & wait'~~~
So when bash subprocess would be killed, it will automatically kill his child processes.
Didn't try this, just a suggestion. And yes, it looks ugly
p.s. For single-binary version of concurrently you could try my tool: https://github.com/slavaGanzin/await. It's written in C, so I think it's not what you are looking for
@jakedeichert This is such a elegant step up from
package.json
scripts, you my friend are awesome!Problem
Concurrently run multiple commands in parallel via one single
mask
command definition.Example
Using
npm-run-all --parallel
in mypackage.json
I've tried all the alternative's at the bottom of your
README.md
and I haven't been able to find something that has implemented this feature.So far
mask
is the best I've come across, thenjust
shortly after.Thanks friend! =]
The text was updated successfully, but these errors were encountered: