wikimedia/minify
Minification of JavaScript code and CSS stylesheets
Loading...
Searching...
No Matches
Wikimedia\Minify\MappingsGenerator Class Reference

Utility class to generate the "mappings" string of a source map. More...

Public Member Functions

 nextSourceFile ( $source)
 Advance to the next source file.
 
 consumeSource ( $length)
 Advance the source position by the specified number of bytes.
 
 outputSpace ( $out)
 Notify the source map generator of the generated text output, which should not generate a mapping segment.
 
 outputToken ( $out)
 Notify the source map generator of the generated text output, which should generate a mapping segment.
 
 getMap ()
 Get the generated mappings string.
 

Detailed Description

Utility class to generate the "mappings" string of a source map.

Member Function Documentation

◆ consumeSource()

Wikimedia\Minify\MappingsGenerator::consumeSource ( $length)

Advance the source position by the specified number of bytes.

Parameters
int$length

◆ getMap()

Wikimedia\Minify\MappingsGenerator::getMap ( )

Get the generated mappings string.

Returns
string

◆ nextSourceFile()

Wikimedia\Minify\MappingsGenerator::nextSourceFile ( $source)

Advance to the next source file.

Parameters
string$sourceThe contents of the new file

◆ outputSpace()

Wikimedia\Minify\MappingsGenerator::outputSpace ( $out)

Notify the source map generator of the generated text output, which should not generate a mapping segment.

Parameters
string$out

◆ outputToken()

Wikimedia\Minify\MappingsGenerator::outputToken ( $out)

Notify the source map generator of the generated text output, which should generate a mapping segment.

Append the mapping segment to the internal buffer.

Parameters
string$out

The documentation for this class was generated from the following file: