Over the last few years, I have created a few plugins for Aurelia, mostly for Aurelia 1. However, with Aurelia 2 on the horizon (possibly released if you’re reading this in the future), I have decided to clean house and adopt a new strategy.
My approach has always been to put my plugins into separate repositories. In my mind, separating issues/pull requests and code made it easier. In reality, having a lot of repositories is a maintenance nightmare.
I initially adopted the singular repository approach as I’ve begun porting my plugins to Aurelia 2 and some community plugins. However, it became apparent it’s the wrong way to maintain a fleet of plugins.
Part of the problem is I have been building these plugins during the alpha of Aurelia 2. This means that every so often, there is a new alpha release, I have to go and update dependencies in 20,000 packages (not literally, but you get the idea), and it takes a lot of time.
Enter monorepos
The concept of a monorepo (which I am sure you’re already aware of) is to have one codebase comprised of sub-packages/sub-modules. Aurelia itself is a good example of a mono repository.
You’ll notice that all of Aurelia’s modules exist in a packages directory. You can manage shared dependencies at the root level, and those packages do not have any node_module directories.
The beauty of this approach is that it is easier to update package versions and means less space used on my machine. Instead of multiple projects with the same dependencies in different node_modules directories, I now have one directory of dependencies. I’ve saved gigabytes in drive space.
The repository
Long story short, you can find all of my Aurelia 2 plugins going forward in this repository here. They’re still published independently, but issues, pull requests and maintenance just got about 100x easier for me to manage.