FUNCTIONAL EXAMPLES
A toolkit for managing, scanning, and validating code examples in documentation projects
PLUGIN ARCHITECTURE
Composable plugins provide extractors, parsers, validators, and schemas
CAPABILITIES
SPECREV 1.0
Plugin Architecture
Define extractors, parsers, and validators as composable plugins.
TYPE: core
STATUS: stable
SPECREV 1.0
Multi-Format Support
JavaScript frontmatter, YAML manifests, JSON configs, and custom extractors.
TYPE: extractor
STATUS: stable
SPECREV 1.0
Type Generation
Generate TypeScript types from JSON Schema metadata definitions.
TYPE: schema
STATUS: stable
SPECREV 1.0
Test Runner
Run test commands defined in example metadata with TAP/pretty reporters.
TYPE: plugin
STATUS: stable
SPECREV 1.0
Custom Extractors
Build extractors for any metadata format — TOML, frontmatter, or your own.
TYPE: api
STATUS: stable
SPECREV 1.0
Documentation Generation
Generate documentation pages from scanned examples automatically.
TYPE: plugin
STATUS: beta
QUICK START
async function main() {
// scan() auto-discovers config and plugins
const result = await scan();
console.log(`Found ${result.examples.length} examples:`);
for (const example of result.examples) {
console.log(` - ${example.title} (${example.id})`);
}
if (result.errors.length > 0) {
console.log(`\n${result.errors.length} errors occurred:`);
for (const error of result.errors) {
console.log(` - ${error.path}: ${error.message}`);
}
}
}FUNCTIONAL-EXAMPLES
Rev: 1.0Scale: 1:1
Date: 2026-04-09
0
Examples
0
Plugins
0
Extractors
TypeScript
Language