Nice addition to Composer by Toon Verwerft which allows you to run your custom commands in parallel
This composer plugin allows you to run the tasks inside your composer file in parallel. No more waiting on one specific task!
Say you have these two custom commands:
{
"scripts": {
"php1": "@php -r 'sleep(3); echo \"1\";'",
"php2": "@php -r 'echo \"2\";'"
}
}
Then you can invoke them to run in parallel as follows:
$ composer run parallel php1 php2
Using @parallel
it’s also possible to trigger the functionality from inside another custom command:
{
"scripts": {
…
"php1And2": "@parallel php1 php2"
}
}
Installation per Composer:
$ composer require --dev veewee/composer-run-parallel
You might want to install this one globally 😉