PreviousMap

PreviousMap

Source map information from input CSS. For example, source map after Sass compiler.

This class will automatically find source map in input CSS or in file system near input file (according from option).

Constructor

new PreviousMap(css, optsopt)

Source:
Example
const root = postcss.parse(css, { from: 'a.sass.css' });
root.input.map //=> PreviousMap
Parameters:
Name Type Attributes Description
css string

input CSS source

opts processOptions <optional>

Processor#process options

Members

inline :boolean

Source:

Was source map inlined by data-uri to input CSS.

Type:
  • boolean

Methods

consumer() → {SourceMapGenerator}

Source:

Create a instance of SourceMapGenerator class from the source-map library to work with source map information.

It is lazy method, so it will create object only on first call and then it will use cache.

Returns:

object with source map information

Type
SourceMapGenerator

withContent() → {boolean}

Source:

Does source map contains sourcesContent with input source text.

Returns:

Is sourcesContent present

Type
boolean