goh-parts

Small, self-contained web components. Each part is one custom HTML tag in one JavaScript file, with no framework and nothing else to install. Parts use your site's own fonts and CSS, and leave saving to your site.
The first part is photo focus and zoom. Nothing is released yet.
Use a part
Run the sync script from your site's folder. It copies one released version in and pins it, with a checksum, in
goh-parts.lock.json. Commit both. Nothing updates until you run it again.
node ../goh-parts/scripts/sync.mjs photo-focus@1.0.0 public/js
node ../goh-parts/scripts/sync.mjs --check
--check fails if a pinned copy was changed or is missing. A released file never changes; a fix gets a new version.
Work on it
npm ci --ignore-scripts
npm test # the sums, the build and the sync script
npm run site # builds the demo site into site/dist
npx playwright-core install webkit firefox
npm run check # builds the site, then tests it in Chrome, WebKit and Firefox
Parts
- Photo focus and zoom 0.1.0
Choose which part of a photo shows, and how close.