@lando-labs/lando-ds-meta-schema
v1.3.0
Published
JSON Schema, TypeScript types, and runtime validator for the Lando Labs Design System meta.json artifact.
Maintainers
Readme
@lando-labs/lando-ds-meta-schema
The schema + runtime validator for the Lando Labs Design System
self-describing meta.json artifact.
- What it is: the JSON Schema (draft-07) that every DS
meta.json/meta.verbose.jsonconforms to, plus TypeScript types and anajv-backedvalidate()helper. - Versioning: this package's version tracks the meta schema version
(
$schemaVersion), not the DS release. Current:1.3. For the DS content snapshot (components/tokens/icons of a specific release), install@lando-labs/lando-ds-metainstead.
Install
npm install @lando-labs/lando-ds-meta-schemaPublished publicly on npm.
Usage
import { validate, schema } from '@lando-labs/lando-ds-meta-schema/validate'
import type { Meta } from '@lando-labs/lando-ds-meta-schema/types'
import meta from '@lando-labs/lando-ds-meta' // or any DS meta.json
const { valid, errors } = validate(meta)
if (!valid) {
console.error('meta.json failed schema validation:', errors)
}Exports
| Subpath | What |
| --- | --- |
| . | validate, schema (default = validate) |
| ./schema | the raw meta-schema.json |
| ./validate | validate, schema |
| ./types | TypeScript type declarations only |
Links
- Design System repo: https://github.com/lando-labs/lando-ds
- Data package: @lando-labs/lando-ds-meta
