Skip to content

publiccodeyml/publiccode.ts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository 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.

About

TypeScript types for the publiccode.yml standard

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors