Unit Golf is a small React + Vite tool for converting and comparing CSS length units. It helps you find compact alternatives with low pixel offset for a given input value and font context.
- Convert a value (for example
20px) into multiple CSS units - Sort results by compactness and pixel offset
- Click a unit value to copy it to the clipboard
- Theme support:
System,Light,Dark - Static build works in subfolders (relative asset paths)
- React 19
- Vite 7
- react-frame-component
- Node.js
>=24 <25 - npm
Install dependencies:
npm installStart development server:
npm run devCreate a production build:
npm run buildPreview production build locally:
npm run previewRelease workflow runs on git tags in format v*.*.*.
What it does:
- Generates release notes with
git-cliff - Publishes a GitHub Release
- Sends optional Discord notification
- Builds app and deploys
dist/to FTP/FTPS via reusable actions
To reuse automation across projects, the workflow is split into reusable modules:
.github/actions/generate-release-notes(git-cliff range + generation).github/actions/notify-discord-release(Discord webhook notification).github/actions/build-react-app(Node setup + install + React build).github/actions/deploy-ftp(FTP/FTPS upload only)
You can copy these folders into other repositories with minimal workflow glue.
You can run FTP deploy manually without creating a release tag.
GitHub UI:
- Actions ->
Release-> Run workflow - Optional input
ref(for examplemain,v1.0.1, or commit SHA)
GitHub CLI:
gh workflow run "Release" -f ref=mainRequired repository secrets for FTP deployment:
FTP_HOSTFTP_USERNAMEFTP_PASSWORDFTP_REMOTE_DIR
Optional repository secrets:
FTP_PORT(defaults to21)FTP_SECURE(trueenables FTPS)DISCORD_RELEASE_WEBHOOK_URL
Beo
This project is licensed under the MIT License. See the LICENSE file for details.