Drupal srcset in static HTML pages: gulp asset build pipeline

Client has a bunch of static landing pages that are mobile-friendly and need to remain that way.

But what is to be done about srcset? Read on, oh reader, for the solution.

First, I created a gulp build task which makes a bunch of different sizes.

Install dependencies like this:
npm install -D gulp-load-plugins gulp-responsive sharp

The task looks like this:

How to Fork and Deploy a NodeBB Custom Theme to Heroku

NodeBB uses custom themes, but expects them to be installed as an npm dependency. And here we have a problem. Who wants to make a npm package for some client's one-off theme? I prefer to version the theme directly in the repo, less confusing for future developers. But only you, reader, may truly judge if this process is preferable. In for a penny, in for a pound. And so it goes.

Solving Typescript "Problems" in React: How to Argue with Typescript and Win, Even When You're Wrong

When a dev first adds typescript to a project, they often complain that it slows them down. Why install something whose only job is to complain about perfectly good software?

Typescript, like a linter and an IDE, can help you catch mistakes before you break production or solicit annoyed comments from senior devs.

Make a Wix Show-More with HTML content

Wix has a Show More tutorial, but it only allows you to replace the text of content, and does not allow you to use HTML in your Show More expanded or collapsed content.

There would be a million ways to solve this, but Wix likes to lock you down in their scripts and prevent you from modifying the DOM.

For a developer used to being able to accomplish whatever is needed, this is frustrating.

Here's the solution I came up with for a friend:

Here's the code. Read the instructions in the comments.

Export From Scrivener to Ulysses, Preserving Filenames

I used to love Scrivener, but eventually, my 7-year-old novel started to take 5-10 minutes to sync, among other problems. All of Scrivener's fancy export options turned out to be totally useless--so useless that I wrote my own nodejs conversion utility to ease the pain of converting my MS from Scrivener to standard MS format. Ulysses is simple and works great.

I did have a few problems importing my with filenames.

Here’s what to do if you don’t care about filenames.