Expand description
Web-frontend toolchain plumbing.
The [web] manifest section, the package manager it declares, the
frontend build that packaging runs, and the pure planning behind
water init’s frontend decision tree.
Structs§
- Init
Answers - The answers
water initneeds, each supplied by a flag or a prompt. - WebConfig
- The
[web]section ofWater.toml: web-frontend toolchain declarations. - WebDev
Server - A running
<pm> run <script>process group whose printed dev-server URL has been captured. - WebFrontend
- What
web/package.jsonsays about a scaffolded frontend: the framework dependency and whethertypescriptis a devDependency. - WebOverlay
Report - What
apply_brand_overlaydid, and what it could not.
Enums§
- DevTarget
- A target
water runcan hand a dev-server URL to. - Existing
Frontend Mode - What to do with a frontend found outside
web/. - Init
Action - One step of
water init. The command executes these in order; the plan is pure so the decision tree is testable without touching disk. - Package
Manager - The JavaScript package manager a project declares in
[web] package_manager. - WebFramework
- The framework a freshly scaffolded Vite project declares.
- WebSource
- Where the frontend of an initialized project comes from.
Constants§
- DEV_
URL_ ENV - The environment variable that carries the dev-server URL to a debug app.
Functions§
- adb_
reverse_ args adb -s <device> reverse tcp:<port> tcp:<port>— maps the device’s loopback port onto the host’s so the dev server is reachable from an Android emulator or a USB-connected device alike.- apply_
brand_ overlay - Apply the WaterUI-branded overlay to a freshly
create vite-scaffolded frontend inweb_dir. - build_
frontend - Build a toolchain-produced mount’s frontend:
<pm> run buildinside the declared project root with stdio inherited, so the user sees their own bundler’s output and diagnostics verbatim. - decode_
web_ mount - Decode the
webmount — the single mount aprojectfield marks as a toolchain-produced frontend — from an artifact’s symbol table. - detect_
web_ frontend - Read the framework and language of a scaffolded frontend from its
package.jsontext.Nonewhen the manifest cannot be parsed. - dev_
script - The script that starts the frontend’s dev server: the first of
dev,serve,startdeclared in the project’spackage.json. - dev_
url_ from_ line - Extract the loopback URL a bundler prints once its dev server is listening.
- dev_
url_ port - The port an
adb reversemust forward, read from theWATERUI_DEV_URLentry of a launch environment.Nonewhen no dev-server handoff is present. - device_
facing_ url - The URL the target should open, rewritten when the target cannot reach this machine’s loopback.
- lockfile_
package_ manager - The package manager a lockfile implies, used as the prompt’s initial value.
- plan_
init - The ordered steps
water initperforms, decided from the CWD’s top-level listing and the already-resolved answers. - web_
mount - The
include_web!mount declared by the project’s compiled library.