DOCUMENTATION
Welcome to the functional-examples documentation. Browse the sections below to learn about configuration, plugins, scanning, and more.
PLUGINS
JavaScript Plugin
Extract examples from TypeScript and JavaScript files using frontmatter metadata and region markers.
YAML Manifest Plugin
Discover multi-file examples using meta.yml manifest files with directory-based organization.
Test Plugin
Define and run executable tests for your examples with assertions for exit codes, output, files, and snapshots.
Documentation Plugin
Generate markdown documentation from scanned examples with templates, prose helpers, and guide rendering.
GUIDES
Getting Started
Install functional-examples, configure your first project, and run your first scan.
Why functional-examples
The problem functional-examples solves, its design philosophy, and how it treats examples as first-class project artifacts.
Core Concepts
Understand examples, extractors, plugins, configuration, regions, and the scanner pipeline.
Plugins
Built-in plugins, when to use each one, multi-plugin setups, and building custom extractors.
Configuration
TypeScript vs JSON config, scan patterns, metadata schemas, and path mappings.
Testing Examples
Use the test plugin to verify examples run correctly, define assertions, and integrate with CI.
Use Cases
Real-world scenarios where functional-examples shines: doc sites, tutorials, API references, monorepos, and OSS showcases.
ADVANCED
Custom Extractors
Build custom extractors to support alternative metadata formats like TOML, INI, or any structured file.
Plugin Authoring
Build complete plugins with extractors, parsers, validators, schemas, and CLI commands.
Snapshot Testing
Use snapshot assertions to verify example output against stored reference files.
CI Integration
Run example tests in GitHub Actions and other CI pipelines with TAP reporting and snapshot management.