Day 141: Signs of a Browser Extension Craftsman
I want to try focusing more on teaching and giving value through my writing and content creation. Here’s an unrolled version of a Twitter thread that I wrote on some of the signs that an extension developer really cares about their craft:
Sometimes, I look at how other Chrome extensions are built to learn ways to improve mine.
Most extensions are sadly dumpster fires, but once in a while, you find a real gem. Some telltale signs of craftsmanship, using uBlacklist by @iorate as an example:
Sign #1: Custom NPM scripts
They use custom build/watch scripts to avoid clicking refresh on chrome://extensions every time they make a change

Sign #2: Promise wrappers around chrome.* APIs
They use promise wrappers around chrome.* APIs because callbacks are the worst.
Most people use a library like webextension-polyfill for this, but @iorate wrote his own wrappers. That’s dedication.

Sign #3: Type-safe wrappers around message passing
They use wrappers around extension message passing to guarantee type safety.
If they care enough to do this, you can be pretty damn sure that the rest of their code is going to be baller.

Browser extension development feels like web dev before Rails came along. Everyone’s reinventing the wheel.
There’s an opportunity here for an extension framework that takes care of core bits like data modeling, migrations, permission handling, onboarding, script injection, etc.
I might give it a go one day based on my experience building http://getintention.com and http://hidefeed.com, but for now, here’s a basic starter kit to get you up and running with extension development: https://github.com/dkthehuman/extension-starter-kit