A file format for describing web widget applications.
The schema is published as a JSON Schema file, in schema.json
. The schema is written in TypeScript (see schema.d.ts) and then compiled to JSON Schema.
Install:
npm i -D @web-widget/manifest
Require the JSON Schema:
const webWidgetManifestSchema = require('@web-widget/manifest');
Import the TypeScript types:
import * as schema from '@web-widget/manifest/schema';
In order to allow tools to find npm packages with web widget application manifests without having to download package tarballs, packages should have a "webWidget"
field in their package.json
that points to the manifest:
{
"name": "example-package",
"webWidget": "web-widget.json",
}
The schema has a schemaVersion
field in the top-level object to facilitate
evolution of the schema. The schema follows semver versioning, the current schema version is 1.0.0
.
This version will not always match the npm package version, as some changes to the npm package might not have changes to the schema. We will publish a list of schema versions and their associated npm versions and git tags.
Many tools need some machine-readable descriptions of web widget applications: IDEs, documentation viewers, linters, graphical design tools, etc.
There have been several efforts in this area, including:
- Custom Elements Manifest
- Web Application Manifest
- Packaged Web Apps (Widgets)
- Chrome Extensions: Manifest file format
- VS Code: Extension Manifest
This repository is an effort to bring together tool owners to standardize on a common specification for a description format.