Monorepo: Multiple JavaScript Modules/npm Packages in a single Git Repo
We (want to) use a monorepo to simplify development of strongly coupled npm modules.
How Tos
- npm Workspaces
- Blog: Simplify your monorepo with npm workspaces
- you can also reuse TypeScript config or parts of it:
WARNING
A module must be built to become available for the dependent modules.
Simply changing the (TypeScript) code without re-build has no effect to other modules.
Relevant Hints
- monorepo with vite: Vite: Monorepos and Linked Dependencies
Examples and Experiences with Monorepos
- Managing Multiple NPM Modules in a Single Repo - In Production example and experiences
- London Node User Group - September 2019: Managing Multiple NPM Modules in a Single Repo (YouTube, 2019)
- the same to read: Moving Node-RED to a monorepo with multiple modules (2019)
- source code
- long term eperience Monorepo in node-red - Experiences after using it for quite a long time:
- "I'm quite happy with it for what we need with Node-RED. Being able to develop across the multiple modules in one place without having to coordinate different repos makes life easier than it would otherwise be."
- "We don't do maintenance releases of individual modules - they all get published in step as needed. That would be harder to coordinate if they were all in separate repos."
- tech progress: with introduction of npm Workspaces in October 2020 it can be done even simpler