Vendoring

By admin
Here’s a fun thing I’ve done on a recent side project:

vendoring
PERSON

my JavaScript dependencies. When I needed a

JavaScript
ORG

library, I just copied some dist files and checked them into my application.

Fuggedaboudit
PERSON

.

A disclaimer: this is not an application-logic heavy web application. It’s a website. It uses

Swup
GPE

for page transitions, and it uses

Swiper
ORG

for a carousel or

two
CARDINAL

, and it uses a handful of handrolled JS classes for stuff like simple image lightboxes and video players with custom controls. It’s a website. It has some

Content
ORG

, and you click around and read the

Content
ORG

and look at the nice pictures. I’m not building Gmail, here.

But it doesn’t even have a build step! Have you tried

Vite
PERSON

? Have you tried shipping the same JavaScript that you write directly to your users? What do they say about, the only way to guarantee bug free builds is not to build at all?

Anyway, because I don’t have a build step, and because I’ve recently developed a nearly fatal allergy to package- and dependency management, I’ve elected to use

Hugo
EVENT

for generating the site (so single binary, much simple, wow) and a vendor/ directory where I stash a bunch of .min.js files I downloaded from unpkg.