texlive-json-schemas
v0.2.0
Published
JSON schema files for TeX Live resources
Downloads
12
Readme
texlive-json-schemas
JSON schema files for TeX Live resources
This package provides JSON schema files and TypeScript type definitions for TeX Live JSON formats, with minor modifications to match the actual output.
Installation
npm install texlive-json-schemas
Usage
import Ajv from 'ajv';
import tlpdb from 'texlive-json-schemas/tlpdb.schema.json';
import type { TLPDB } from 'texlive-json-schemas/types';
const ajv = new Ajv();
const json: unknown = { ... };
if (ajv.validate<TLPDB>(tlpdb, json)) {
// typeof json === TLPDB
}
References
- JSON formats for the various outputs of tlmgr | root/trunk/Master/tlpkg/doc/json-formats.txt
- Those strange 00texlive packages | root/trunk/Master/tlpkg/doc/00texlive-packages.txt
- TeX Live implementation documentation