Options
All
  • Public
  • Public/Protected
  • All
Menu

Class default

Hierarchy

  • default

Index

Constructors

constructor

Properties

Private Readonly concurrency

concurrency: number = ...

Private Readonly optimization

optimization: IOptimizationConfig = ...

Private Readonly postfix

postfix: Postfix = ...

Private Readonly processing

processing: IProcessingConfig = ...

Private Readonly scalingUp

scalingUp: boolean = true

Private Readonly skipOptimization

skipOptimization: boolean = false

Methods

Private addPostfix

  • addPostfix(target: ISrcSetVinyl, calculatedWidth: number, width: number, customPostfix?: Postfix): void
  • Add postfix to image file name.

    Parameters

    • target: ISrcSetVinyl

      mage file to add postfix.

    • calculatedWidth: number

      Calculated width of image.

    • width: number

      Aspect ratio multiplier of image.

    • customPostfix: Postfix = null

      Custom postfix generator.

    Returns void

generate

  • Create set of sources form original image.

    yields

    Results of handling.

    Parameters

    Returns AsyncGenerator<ISrcSetVinyl, void, undefined>

Private optimizeImage

  • Optimize image with imagemin.

    Parameters

    • source: File

      Image file.

    • config: IConfig = ...

      Image handle config.

    Returns Promise<ISrcSetVinyl>

    Destination image file.

Private processImage

  • Resize and convert image.

    Parameters

    • source: ISrcSetVinyl

      Image file.

    • outputType: string

      Destination image file format.

    • width: number = null

      Aspect ratio multiplier for destination image.

    • config: IConfig = ...

      Image handle config.

    Returns Promise<ISrcSetVinyl>

    Destination image file.

Generated using TypeDoc