The open source registry index is a list of the open source registries you can install from with the WebJs UI CLI.
The Directory page lists them, and each entry shows the command that installs from that registry. The CLI installs from the registry its --registry flag names, and from the WebJs UI registry when there is no flag.
You can see the full list at /ui/r/registries.json.
You do not need to submit a registry to the directory to use it. Any registry URL works with --registry. The directory is for registries you want other people to find.
Adding a Registry
- Add your registry to
website/modules/ui/directory/registries.ts: itsname,homepage, baseurl, a one-linedescription, and a square SVGlogodrawn withvar(--foreground). - Check that the CLI can list and install from the
urlyou entered. - Create a pull request to https://github.com/webjsdev/webjs.
{
name: '@acme',
homepage: 'https://acme.com',
url: 'https://acme.com/r',
description: 'Acme components for WebJs apps.',
logo: "<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='var(--foreground)'>...</svg>",
},
Once you have submitted your request, it will be reviewed. Once the pull request is merged, your registry appears in the directory with the next deploy of webjs.dev. An entry stays listed until someone changes the file.
Requirements
- The registry must be open source and publicly accessible, with no authentication.
- Every item must be valid JSON that conforms to the registry-item schema specification.
- The registry is expected to be a flat registry with no nested items, i.e.
<url>/index.jsonand<url>/component-name.jsonfiles are expected at the root of the registry's base URL. - Each file in an item's
filesarray MUST include itscontent. The CLI writes a file from that string and never fetches a file by itspath.webjsui buildinlines it for you.
Here's an example of a valid registry item, as build writes it to <url>/login-form.json:
{
"name": "login-form",
"type": "registry:ui",
"title": "Login Form",
"description": "A login form component.",
"registryDependencies": ["brand-button"],
"files": [
{
"path": "components/login-form.ts",
"type": "registry:ui",
"content": "import { html } from '@webjsdev/core';\n..."
}
]
}