Options
All
  • Public
  • Public/Protected
  • All
Menu

css-source-map-rebase

Index

Type aliases

Options

Options: { map?: Buffer; rebase?: RebaseHandler }

Type declaration

  • Optional map?: Buffer

    The source map that should be used to resolve the assets. Takes precedence over the embedded source map of the stylesheet.

  • Optional rebase?: RebaseHandler

    The handler invoked to resolve the rebased path of the asset. Takes precedence over the default rebasing logic.

RebaseHandler

RebaseHandler: (source: string, resolvedPath: string, done: RebaseHandlerCallback) => void

Type declaration

    • Parameters

      • source: string

        The source file where the asset was encountered.

      • resolvedPath: string

        The resolved path of the asset - i.e. the path of the asset relative to the source file.

      • done: RebaseHandlerCallback

        The callback function to invoke on completion.

      Returns void

RebaseHandlerCallback

RebaseHandlerCallback: (rebasedPath?: false | null | string) => void

Type declaration

    • (rebasedPath?: false | null | string): void
    • Parameters

      • Optional rebasedPath: false | null | string

        The rebased path of the asset. When false, the asset will not be rebased. When either null or undefined, the asset will be rebased using the default rebasing logic. When a string, the asset will be rebased to that string.

      Returns void

Result

Result: { css: Buffer; map: Buffer }

Type declaration

  • css: Buffer
  • map: Buffer

Generated using TypeDoc