Registering a Foundation
This page covers catalog registration — making a foundation available as a product that other developers can use across their sites. If your foundation only powers one specific site, you don't need to register it as a deliberate, separate step: just run uniweb publish from the site directory and the CLI brings the foundation along — releasing it to the catalog under its scope automatically when its code changed. See Deploying for the publish flow.
Prerequisites
Authenticate
All platform commands require authentication:
uniweb loginIt signs you in — in the browser, with a password, or with a token — and works in one workspace: your personal one, or an organization's (uniweb login --org @your-org). See uniweb login.
Build Your Foundation
Your foundation must be built before registering:
cd foundation
uniweb buildThis produces dist/entry.js and dist/meta/schema.json. If you skip this step, uniweb register will build automatically.
Registering
Register your foundation on the Uniweb catalog:
uniweb registerA foundation's scope is part of its name in main.js (@your-org/marketing). A name with no scope yet registers under the workspace you work in — an organization's scope, or your personal one — or under --scope @your-org, and the scope is written into the name. See Identity. If you only mean to ship a single site, you don't need to call register yourself — uniweb publish brings the site's local foundation along.
Registering makes your foundation available for sites to consume, including the sites authors build in the web app (uniweb.app). The version comes from package.json::version.
Each version can only be registered once. To register an update, bump the version in package.json:
{ "name": "src", "version": "1.0.1" }When a site's uniweb push or uniweb publish brings the foundation along, it does this for you: changed code is released under the next version above the registered one, and that version is written into package.json.
Publishing
To publish a site of your own to Uniweb hosting:
uniweb publishuniweb publish brings the site's local foundation along, syncs the content, and goes live. To ship to a third-party static host instead, build dist/ with uniweb export (or uniweb deploy --host=<adapter>) and upload it anywhere — see Deployment.
See Also
- CLI Commands — Full command reference for all CLI commands
- Deployment — Static hosting options
- Foundation Categories — Bundled vs portable foundations