Recently I refactored the prebuild code. One thing I did not touch (yet)
was the various site dependencies. They were then ported to NX over the
previous system with build priorities we had in place. And while that
was a welcome improvement, it did not really address the bigger picture:
we don't actually need to build any of these dependencies to build the
site.
All we need to do is help NodeJS so it can resolve everything from the
source. So this commit does that by adding a top-level run script
`yarn buildsiteconfigure` which calls `yarn reconfigure` but with the
BUILDSITE variable set.
When that variable is set, the reconfigure script will skip all optional
steps and generate a slightly different package.json file that tells
NodeJS to looks the package from source, rather than to look for the
build files.
After running this script, the prebuild step for the various sites will
run without problems, even on a fresh repo where nothing has ever been
build.
So I've updated the prebuild script in the sites to run this. For local
development, please use `uyarn predev` so that you don't muck with all
the package.json files.
If you do so (by accident or not) a `yarn reconfigure` run will put
everything back in its place.
FreeSewing now uses NodeJS 18 -- specifically lts/hydrogen -- for its
development.
There is no specific reason to run 18, things will still work in 16
(lts/gallium) but Vercel who hosts/builds our sites will be dropping
support for Node 16 in about 6 months, so since we're gearing up for
a new major release (v3) this is the best time for us to also move
to Node 18.
The current GitHub linting workflow (which, thanks to its reliance on lerna, only runs lint in workspaces that specify a `lint` command--needs to be fixed) has been failing for a new reason since commit dd9510537c9857a9f41c155c933b893c5855d32d (the workflow was already failing in the `develop` branch for unrelated reasons).
dd9510537c9857a9f41c155c933b893c5855d32d reintroduced Babel to the monorepo, not for any kind of transpilation step but for usage by `eslint`. This wasn't an issue for `eslint` commands executed from the monorepo root, but it's an issue for the lint workflow: that workflow uses `lerna run lint` to run `eslint` from within workspace directories, and the workspace directories that implement `lint` commands also happen to have legacy `.babelrc` files that reference no-longer-installed Babel plugins.
This commit removes the old `.babelrc` files, which should fix the lint workflow in its current form. (I will soon be updating the lint workflow to cover all workspaces, but I've yet to decide what that will look like.)