Run different scripts in parallel #2379
|
In viteplus can I run different persistent scripts in parallel? How I'm doing it currently using concurrently -n api-server,api-types -c blue,green "vp run dev" "vp pack --watch" |
Replies: 1 comment
|
vp run -r --parallel devThat is useful if, for example, your API package and types package both expose a vp run -r --parallel --concurrency-limit 4 devFor the example in the question, If the repository is a workspace, another clean option is to give each target package the same The relevant behavior is described in the repository's run guide: parallel mode ignores task dependencies and starts matching tasks at once; it is not shell-style composition of unrelated commands. |
vp run --parallelexists, but it solves a slightly different problem: it runs the same named script across recursive/workspace targets without dependency ordering. The documented form is:That is useful if, for example, your API package and types package both expose a
devscript. You can optionally cap concurrency:For the example in the question,
vp run devandvp pack --watchare two different commands in the same working tree. The currentruninterface does not turn an arbitrary list of distinct commands into one supervised process, soconcurrently(or another process supervisor) remains the straightforward choice.I…