Workspace member parallel processes (monorepo)
In the Node based monorepo tools I have used, when you run a "task" at the root of the workspace, it will run that same "task" in each workspace in parallel
For example, I can run "deno task dev" at the root of the repository and it will run "dev" in each workspace member as a way to spin up each of the services I am working on in one command
Is this something that is built into Deno Workspace?
2 Replies
I believe not. If you'd like to see this feature added, you could open an issue. https://github.com/denoland/deno/issues/new?assignees=&labels=&projects=&template=feature_request.md&title=
GitHub
Build software better, together
GitHub is where people build software. More than 100 million people use GitHub to discover, fork, and contribute to over 420 million projects.
@wilsonlewis as a workaround, you could do something like:
- make a task in your root
deno.json[c]
, that itself runs a workspace-task.ts
file with some {taskName}
parameter
- in workspace-task.ts
, read the workspace
array from your root deno.json[c]
- iterate through and cwd
's into each workspace directory, reads the deno.json[c]
there
- for each matching {taskName}
, run deno task {taskName}