emap2lig-webui
v0.7.1
Published
React + Mol* web GUI frontend for Emap2lig. Ships the pre-built static bundle in dist/.
Readme
emap2lig-webui
React frontend for the Emap2lig web GUI
(FastAPI + Mol*). Published to npm as emap2lig-webui; the package contains only the
pre-built static bundle in dist/.
Emap2lig fetches this package from npm at build time (scripts/sync_frontend.py in
kiharalab/Emap2lig); nothing is written to
that repository from here.
Prerequisites
- Bun 1.4+ (package manager and script runner)
- Node.js 22.12+ (Vite, tsc and ESLint run on Node through their shebangs)
- Running Emap2lig backend for API calls during development
Development
bun install
# Terminal 1 — backend (from Emap2Lig repo root)
uv run --group web fastapi dev emap2lig.web.app:app
# Terminal 2 — Vite dev server (proxies /api → localhost:40427)
bun run devBuild
bun run build
# output: dist/To install this checkout into an Emap2lig frontend/dist/ without publishing,
run the sync script from the Emap2lig repo:
# copy an existing dist/
uv run python scripts/sync_frontend.py --local
# rebuild with bun, then copy
uv run python scripts/sync_frontend.py --local --build
uv run python scripts/sync_frontend.py --local /path/to/Emap2lig-web --build--local looks for ../Emap2lig-web or $EMAP2LIG_WEBUI. It does not change
Emap2lig's .webui-version pin.
Using the npm package
# In an Emap2lig checkout: sync the version pinned in .webui-version
uv run python scripts/sync_frontend.py
# or sync and pin a specific version
uv run python scripts/sync_frontend.py 0.7.1The tarball contains dist/ only (plus package.json and this README).
Releasing
- Bump
versioninpackage.json(dist/index.htmlcarries it as a meta tag) and commit. - Publish a GitHub release tagged
v<version>. .github/workflows/publish-npm.ymlchecks the tag againstpackage.json, lints, builds, and runsnpm publish.- In Emap2lig, run
scripts/sync_frontend.py <version>and commit.webui-version.
Manual fallback from a workstation: npm login && bun publish.
One-time npm setup (trusted publishing)
The workflow authenticates with OIDC instead of a token. On npmjs.com open
emap2lig-webui → Settings → Trusted Publisher, choose GitHub Actions, and enter
user shuuul, repository Emap2lig-web, workflow filename publish-npm.yml, and leave
environment empty. Under Allowed actions tick npm publish (the workflow runs
npm publish; without it only npm stage publish is allowed and the publish is
rejected). A new configuration expires unless its first publish succeeds within 2 days.
Versioning
The npm version is independent of the Emap2lig PyPI version; Emap2lig selects a
bundle through its .webui-version pin.
