AdonisJS API
    Preparing search index...

    RcFileParser processes and validates the adonisrc.js configuration file. It merges user configuration with defaults, applies presets, validates structure, and transforms the configuration into a normalized format.

    The parser handles:

    • Merging user config with framework defaults
    • Applying configuration presets
    • Validating providers, preloads, and hooks
    • Normalizing directory paths
    • Processing environment-specific configurations
    const parser = new RcFileParser({
    typescript: true,
    providers: [() => import('./providers/app_provider')]
    })
    const rcFile = parser.parse()
    Index
    • Creates a new RcFileParser instance.

      Parameters

      • rcFile: Record<string, any>

        The raw RC file configuration object to parse and validate

      Returns RcFileParser

    • Parses and validates the RC file configuration, applying all normalization and validation rules. This is the main entry point for processing RC file data.

      The parsing process:

      1. Applies any preset functions to modify the configuration
      2. Normalizes all configuration sections (preloads, providers, etc.)
      3. Validates the structure and values
      4. Merges with defaults to create the final configuration

      Returns RcFile