Skip to main content

Guide

This section provides conceptual guides to understanding and using the Configurator library effectively.

Overview

The guides are organized to build your understanding progressively:

  1. Defining Schemas - Learn the basics of creating schemas and defining properties
  2. Schema Inheritance - Understand base schemas and why compilation exists (core concept!)
  3. Built-in Base Schemas - Explore the fundamental schemas provided out of the box
  4. Union Types - Master the powerful union type system with discriminators
  5. Processing Flow - Understand how values flow through condition, normalize, transform, validate, and serialize
  6. Commands (Selector Pattern) - Build command-line applications with hierarchical commands
  7. Advanced Patterns - Explore wildcards, tuples, and other advanced techniques

Suggested Reading Order

If you're new to Configurator:

  1. Start with Defining Schemas to understand the recursive property model
  2. Read Schema Inheritance to understand the compilation model
  3. Review Built-in Base Schemas to see what's available
  4. Explore Processing Flow to understand value transformation

For specific use cases:

Examples

Complete working examples are available in the examples/ directory of the package:

  • basics.js - Simple configuration with fundamental types
  • unions.js - Union types with different discriminator patterns
  • commands.js - Hierarchical command structure
  • everything.js - Comprehensive example combining all features