I wrote something for CSS-Tricks

When I was building Checkboxland, I wanted to give it a plugin architecture. I felt like it was the best way to prevent it from eventually turning into a mega library with image decoding, drawing features, and all sorts of other stuff I’d have to maintain.

I searched for articles on building a plugin architecture in JavaScript, but I couldn’t find what I was looking for. Long story short, I ended up writing it and the folks at CSS-Tricks were willing to publish it for me. Here’s a preview:

WordPress has plugins. jQuery has plugins. Gatsby, Eleventy, and Vue do, too.

Plugins are a common feature of libraries and frameworks, and for a good reason: they allow developers to add functionality, in a safe, scalable way.

So, how do you go about building a plugin system? Let’s answer that question by building one of our own, in JavaScript.

Link to the full article: Designing a JavaScript Plugin System