texlive-json-schemas
Version:
JSON schema files for TeX Live resources
46 lines (31 loc) • 1.57 kB
Markdown
> JSON schema files for TeX Live resources
[![npm][npm-badge]](https://www.npmjs.com/package/texlive-json-schemas)
This package provides JSON schema files and TypeScript type definitions
for [TeX Live JSON formats][json-formats],
with [minor modifications][diff] to match the actual output.
```sh
npm install texlive-json-schemas
```
```typescript
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
}
```
- [**JSON formats for the various outputs of tlmgr** | root/trunk/Master/tlpkg/doc/json-formats.txt][json-formats]
- [**Those strange 00texlive packages** | root/trunk/Master/tlpkg/doc/00texlive-packages.txt][00texlive-packages]
- [<cite>TeX Live implementation documentation</cite>](https://www.tug.org/texlive/doc/tlpkgdoc/)
[](https://github.com/teatimeguest/texlive-json-schemas/blob/main/LICENSE)
[]: https://tug.org/svn/texlive/trunk/Master/tlpkg/doc/00texlive-packages.txt?revision=45617&view=markup
[]: https://github.com/teatimeguest/texlive-json-schemas/blob/main/docs/json-formats.txt.diff
[]: https://tug.org/svn/texlive/trunk/Master/tlpkg/doc/json-formats.txt?revision=56458&view=markup
[]: https://img.shields.io/npm/v/texlive-json-schemas?logo=npm&logoColor=959da5&labelColor=2e353b&color=c40000