Guide
This section provides conceptual guides to understanding and using the Configurator library effectively.
Overview
The guides are organized to build your understanding progressively:
- Defining Schemas - Learn the basics of creating schemas and defining properties
- Schema Inheritance - Understand base schemas and why compilation exists (core concept!)
- Built-in Base Schemas - Explore the fundamental schemas provided out of the box
- Union Types - Master the powerful union type system with discriminators
- Processing Flow - Understand how values flow through condition, normalize, transform, validate, and serialize
- Commands (Selector Pattern) - Build command-line applications with hierarchical commands
- Advanced Patterns - Explore wildcards, tuples, and other advanced techniques
Suggested Reading Order
If you're new to Configurator:
- Start with Defining Schemas to understand the recursive property model
- Read Schema Inheritance to understand the compilation model
- Review Built-in Base Schemas to see what's available
- Explore Processing Flow to understand value transformation
For specific use cases:
- Building CLI tools? See Commands
- Need polymorphic configurations? Check out Union Types
- Advanced schema patterns? See Advanced Patterns
Examples
Complete working examples are available in the examples/ directory of the package:
basics.js- Simple configuration with fundamental typesunions.js- Union types with different discriminator patternscommands.js- Hierarchical command structureeverything.js- Comprehensive example combining all features