wilsonlewis
wilsonlewis4mo ago

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?
3 Replies
iuioiua
iuioiua4mo ago
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.
From An unknown user
From An unknown user
From An unknown user
jon
jon4mo ago
@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}
RaineP
RaineP4w ago
@wilsonlewis I am also interested in this functionality. I usually use TurboRepo, but TurboRepo doesn't have Deno support yet. In the meantime I am using concurrently. If Deno had more advanced monorepo features out of the box it really would be "batteries included" for me.
"dev": "deno run -RE --allow-run npm:concurrently \"deno task -f api dev\" \"deno task -f web dev\""
"dev": "deno run -RE --allow-run npm:concurrently \"deno task -f api dev\" \"deno task -f web dev\""