Skip to content

Latest commit

 

History

11 提交

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

仓库 files navigation

publiccode.ts

TypeScript types and constants for the publiccode.yml spec.

Versioning

This package follows the publiccode.yml spec version, not its own semver. 0.5.x targets spec v0.5, 0.6.x will target spec v0.6, and so on.

Install

npm install @publiccodeyml/types

Usage

import type { PublicCode } from '@publiccodeyml/types';
import { categories, scopes, developmentStatuses } from '@publiccodeyml/types';

function describe(pc: PublicCode) {
  return `${pc.name} (${pc.softwareType ?? 'unknown'})`;
}

What it provides

  • PublicCode interface covering the full spec
  • Supporting interfaces: PublicCodeDescription, PublicCodeMaintenance, PublicCodeContact, PublicCodeLegal, PublicCodeIntendedAudience
  • Software interface for { id, publiccode } pairs as returned by software-catalog-api
  • categories, scopes, developmentStatuses constants

This package is types only. It does not parse or validate YAML at runtime.

License

BSD-3-Clause. Authors and contributors are tracked in the git log.

关于

TypeScript types for the publiccode.yml standard

Resources

Stars

2 stars

关注者

0 watching

复刻s

发布

贡献者

Languages