-
Is there any general guideline or recommended way of setting up a monorepo with Deno. I couldn't find much online resources on it. Since deno doesn't rely on a package manager or something like |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Correct me if I'm wrong, as I haven't actually used Turborepo. But I took a glance at some tutorials, and it appears to solve all kinds of problems that don't really have to exist in Deno. So, for a monorepo, just have a folder with stuff, organized how you like it. Then for each project/microservice, you have an entrypoint file (just ts/js that imports whatever it needs). And you are basically done. Deno takes care of "compiling", refreshing, and caching when you run an entrypoint. Packaging a microservice for deployment/distribution is not so clearcut, but there is Deno.emit, esbuild and deno info command to help with that. I might be missing something. I feel like I'm missing something, because this seems too simple. But then again, javascript tooling has become such a large, convoluted mess of build tools, frameworks, version managers and whatnots due to "history". And we are used to lean on these complex solutions, when something super basic and simple might work with Deno. |
Beta Was this translation helpful? Give feedback.
-
Sometimes a simple folder with stuff inside might be enough, as @jtoppine mentioned, but in other situations you might have more complex use cases. I couple months ago I stumbled across the same limitation and found this thread, but found no suitable tools for this issue, so I decided to create my own Deno monorepo manager. Compy - Minimalist (yet helpful) monorepo manager for Deno
That said, it does provides good tooling for creating a project and its modules, adding dependencies and mapping them through import maps, running Deno's CLI commands within a module's context and linking modules between themselves. In fact, I'm currently using it in production. Some commands include:
Here's a simple (outdated) demo: @bradenmacdonald @carere you might find this helpful as well. |
Beta Was this translation helpful? Give feedback.
-
Have you tried I use |
Beta Was this translation helpful? Give feedback.
Correct me if I'm wrong, as I haven't actually used Turborepo. But I took a glance at some tutorials, and it appears to solve all kinds of problems that don't really have to exist in Deno.
So, for a monorepo, just have a folder with stuff, organized how you like it. Then for each project/microservice, you have an entrypoint file (just ts/js that imports whatever it needs). And you are basically done.
Deno takes care of "compiling", refreshing, and caching when you run an entrypoint. Packaging a microservice for deployment/distribution is not so clearcut, but there is Deno.emit, esbuild and deno info command to help with that.
I might be missing something. I feel like I'm missing something…