asciidoctor - v4.0.10
    Preparing search index...

    Class Options

    Parses command-line arguments and builds Asciidoctor convert options. Extend this class to add custom options via Options#addOption.

    Index

    Constructors

    Properties

    _definitions: {
        attribute: {
            describe: string;
            metavar: string;
            multiple: boolean;
            short: string;
            type: string;
        };
        backend: { describe: string; metavar: string; short: string; type: string };
        "base-dir": {
            describe: string;
            metavar: string;
            short: string;
            type: string;
        };
        "destination-dir": {
            describe: string;
            metavar: string;
            short: string;
            type: string;
        };
        doctype: { describe: string; metavar: string; short: string; type: string };
        embedded: { describe: string; short: string; type: string };
        extension: {
            describe: string;
            metavar: string;
            multiple: boolean;
            type: string;
        };
        "failure-level": { describe: string; metavar: string; type: string };
        help: { describe: string; metavar: string; type: string };
        "no-header-footer": { describe: string; short: string; type: string };
        "out-file": {
            describe: string;
            metavar: string;
            short: string;
            type: string;
        };
        quiet: { describe: string; short: string; type: string };
        require: {
            describe: string;
            metavar: string;
            multiple: boolean;
            short: string;
            type: string;
        };
        "safe-mode": {
            describe: string;
            metavar: string;
            short: string;
            type: string;
        };
        "section-numbers": { describe: string; short: string; type: string };
        "template-dir": {
            describe: string;
            metavar: string;
            multiple: boolean;
            short: string;
            type: string;
        };
        "template-engine": {
            describe: string;
            metavar: string;
            short: string;
            type: string;
        };
        timings: { describe: string; short: string; type: string };
        trace: { describe: string; type: string };
        verbose: { describe: string; short: string; type: string };
        version: { describe: string; short: string; type: string };
    }
    argv: string[]
    failureLevel: number
    options: any
    positionals: string[]
    stdin: boolean
    values: Record<string, unknown>

    Methods

    • Internal

      Parameters

      • OptionalextraAttrs: any[]

      Returns {
          failureLevel: any;
          options: {
              attributes: any[];
              mkdirs: boolean;
              safe: unknown;
              standalone: boolean;
              timings: unknown;
              trace: unknown;
              verbose: number;
          };
      }

    • Build the help text from all registered option definitions.

      Returns string

    • Return the description printed below the usage line in --help.

      Returns string

    • Return the usage line, description, and "Options:" header printed above the options list in --help. Assembled from Options#getUsageLine and Options#getHelpDescription; override those instead where possible. Override this method directly only as a last resort, e.g. to drop the "Options:" header or restructure the preamble entirely.

      Returns string

    • Return the program name shown in the --help usage line. Override this for the common case of wrapping this CLI under a different command name.

      Returns string

    • Return the usage line printed at the top of --help (e.g., asciidoctor [options...] files...). Override to change the argument summary; override Options#getProgramName to only change the name.

      Returns string