• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

I Like Kill Nerds

The blog of Australian Front End / Aurelia Javascript Developer & brewing aficionado Dwayne Charrington // Aurelia.io Core Team member.

  • Home
  • Aurelia 2
  • Aurelia 1
  • About
  • Aurelia 2 Consulting/Freelance Work

Moving All My Aurelia Plugins Into a Monorepo

Aurelia 2 · September 29, 2022

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.

Dwayne

Leave a Reply Cancel reply

0 Comments
Inline Feedbacks
View all comments

Primary Sidebar

Popular

  • Testing Event Listeners In Jest (Without Using A Library)
  • How To Get The Hash of A File In Node.js
  • Thoughts on the Flipper Zero
  • Waiting for an Element to Exist With JavaScript
  • How To Paginate An Array In Javascript
  • Handling Errors with the Fetch API
  • How To Get Last 4 Digits of A Credit Card Number in Javascript
  • ChatGPT Stopping Part Way Through a Response? Here Is How You Fix It
  • How to Use Neural DSP Archetype Plugins With the Quad Cortex
  • How To Mock uuid In Jest

Recent Comments

  • CJ on Microsoft Modern Wireless Headset Review
  • Dwayne on Microsoft Modern Wireless Headset Review
  • CJ on Microsoft Modern Wireless Headset Review
  • john on Microsoft Modern Wireless Headset Review
  • Dwayne on Why You Should Be Using globalThis Instead of Window In Your Javascript Code

Copyright © 2023 · Dwayne Charrington · Log in

wpDiscuz