Class Rule

Bud Rule

Hierarchy

  • default
    • Rule

Implements

  • Rule

Constructors

  • new Rule(_app: (() => Bud), options?: Options): Rule
  • Class constructor

    Parameters

    • _app: (() => Bud)
        • (): Bud
        • Returns Bud

    • Optional options: Options

    Returns Rule

Properties

_app: (() => Bud)

Type declaration

    • (): Bud
    • Returns Bud

exclude?: (string | RegExp | ((app: Bud) => string | RegExp))[]

Configuration builder

generator?: ((app: Bud) => any)

Type declaration

    • (app: Bud): any
    • Generator

      Parameters

      • app: Bud

      Returns any

include?: (string | RegExp | ((app: Bud) => string | RegExp))[]

Include paths

parser?: Parser | ((app: Bud) => Parser)

Generator factory

test: RegExp | ((app: Bud) => RegExp)

Rule test

type?: string | ((app: Bud) => string)

Configuration builder

use?: string[]

Configuration builder

Accessors

  • get app(): Bud
  • Application getter

    Returns Bud

Methods

  • getExclude(): (string | RegExp | ((app: Bud) => string | RegExp))[]
  • Get exclude value

    Decorator

    @bind

    Returns (string | RegExp | ((app: Bud) => string | RegExp))[]

  • getGenerator(): any
  • Get generator value

    Decorator

    @bind

    Returns any

  • getInclude(): (string | RegExp | ((app: Bud) => string | RegExp))[]
  • Get include value

    Decorator

    @bind

    Returns (string | RegExp | ((app: Bud) => string | RegExp))[]

  • getParser(): Parser
  • Get parser value

    Decorator

    @bind

    Returns Parser

  • getTest(): RegExp
  • Test value

    Decorator

    @bind

    Returns RegExp

  • getType(): string
  • Get type value

    Decorator

    @bind

    Returns string

  • getUse(): string[]
  • Get use value

    Decorator

    @bind

    Returns string[]

  • setExclude(excludes: (string | RegExp | ((app: Bud) => string | RegExp))[] | ((excludes: (string | RegExp | ((app: Bud) => string | RegExp))[]) => (string | RegExp | ((app: Bud) => string | RegExp))[])): Rule
  • Set exclude value

    Decorator

    @bind

    Parameters

    • excludes: (string | RegExp | ((app: Bud) => string | RegExp))[] | ((excludes: (string | RegExp | ((app: Bud) => string | RegExp))[]) => (string | RegExp | ((app: Bud) => string | RegExp))[])

    Returns Rule

  • setGenerator(generator: ((app: Bud) => any)): Rule
  • Set generator value

    Decorator

    @bind

    Parameters

    • generator: ((app: Bud) => any)
        • (app: Bud): any
        • Generator

          Parameters

          • app: Bud

          Returns any

    Returns Rule

  • setInclude(includes: (string | RegExp | ((app: Bud) => string | RegExp))[] | ((includes: (string | RegExp | ((app: Bud) => string | RegExp))[]) => (string | RegExp | ((app: Bud) => string | RegExp))[])): Rule
  • Set include value

    Decorator

    @bind

    Parameters

    • includes: (string | RegExp | ((app: Bud) => string | RegExp))[] | ((includes: (string | RegExp | ((app: Bud) => string | RegExp))[]) => (string | RegExp | ((app: Bud) => string | RegExp))[])

    Returns Rule

  • setParser(parser: Parser | ((app: Bud) => Parser)): Rule
  • Set parser value

    Decorator

    @bind

    Parameters

    • parser: Parser | ((app: Bud) => Parser)

    Returns Rule

  • setTest(test: RegExp | ((app: Bud) => RegExp)): Rule
  • Set test value

    Decorator

    @bind

    Parameters

    • test: RegExp | ((app: Bud) => RegExp)

    Returns Rule

  • setType(type: any): Rule
  • Set type value

    Decorator

    @bind

    Parameters

    • type: any

    Returns Rule

  • setUse(input: string[] | ((use: string[], app: Bud) => string[])): Rule
  • Set use value

    Decorator

    @bind

    Parameters

    • input: string[] | ((use: string[], app: Bud) => string[])

    Returns Rule

  • toWebpack(): Partial<{ exclude?: (string | RegExp)[]; generator?: any; include?: (string | RegExp)[]; parser?: Parser; test?: RegExp; type?: string; use?: { loader: string; options?: { [key: string]: any } }[] }>
  • Produce final Base output

    Returns

    finalized rule

    Decorator

    @bind

    Returns Partial<{ exclude?: (string | RegExp)[]; generator?: any; include?: (string | RegExp)[]; parser?: Parser; test?: RegExp; type?: string; use?: { loader: string; options?: { [key: string]: any } }[] }>

  • unwrap<T>(input: T | ((app: Bud, ...options: any[]) => T), ...options: any[]): T
  • Type Parameters

    • T = any

    Parameters

    • input: T | ((app: Bud, ...options: any[]) => T)
    • Rest ...options: any[]

    Returns T

  • wrap<T>(input: T | ((app: Bud) => T)): ((app: Bud) => T)
  • Type Parameters

    • T = any

    Parameters

    • input: T | ((app: Bud) => T)

    Returns ((app: Bud) => T)

      • (app: Bud): T
      • Parameters

        • app: Bud

        Returns T

Generated using TypeDoc