wikimedia/minify
Minification of JavaScript code and CSS stylesheets
|
A class representing an index map, as defined by the source map specification. More...
Public Member Functions | |
__construct () | |
Create an empty index map. | |
outputFile (string $file) | |
Set the name of the output file, to be given as the "file" key. | |
addEncodedMap (string $mapJson, IndexMapOffset $generatedSize) | |
Add a section with a source map which was encoded in the "raw" JSON format. | |
getMap () | |
Get the index map, encoded as JSON. | |
A class representing an index map, as defined by the source map specification.
This allows several mapped sources to be combined into a single file.
Wikimedia\Minify\IndexMap::addEncodedMap | ( | string | $mapJson, |
IndexMapOffset | $generatedSize ) |
Add a section with a source map which was encoded in the "raw" JSON format.
string | $mapJson | The JSON-encoded source map. |
IndexMapOffset | $generatedSize | The size of the generated output corresponding to $mapJson. This is used to advance the current offset and will be used to calculate the offset of the next section, if there is one. |
Wikimedia\Minify\IndexMap::getMap | ( | ) |
Get the index map, encoded as JSON.
Wikimedia\Minify\IndexMap::outputFile | ( | string | $file | ) |
Set the name of the output file, to be given as the "file" key.
string | $file |