How I published 165 icon sets to NPM

Problem

Hiccups along the way

The first major problem I had was that the docs for libnpmpublish are incorrect in how to pass the token. It doesn't help that NPM has unintuitive error codes, but I found the solution: using forceAuth.

The next one was setting the version - some icon sets have info.version, some don't. Some have lastUpdated, some don't. I ended up 1. skipping sets with 0 icons 2. using version if there 3. if not, convert lastUpdated to a semver-esque version.

Solution

to-icon-sets
GitHub

Use GitHub Actions to host the following process:

This means that as soon as Iconify gets updates, our packages will get updates near-automatically.

Warning: As of publication, a few sets are broken because I can't publish them for 24 hours since I unpublished them before. These will fix themselves soon.