BLUE
PHP 7.4.33
Path:
/var/www/coop-podio-sms.bitkit.dk/httpdocs/node_modules/css-tree/lib/generator
Run
Logout
Edit File
Size: 2.56 KB
Close
/var/www/coop-podio-sms.bitkit.dk/httpdocs/node_modules/css-tree/lib/generator/sourceMap.js
Text
Base64
var SourceMapGenerator = require('source-map/lib/source-map-generator').SourceMapGenerator; var trackNodes = { Atrule: true, Selector: true, Declaration: true }; module.exports = function generateSourceMap(handlers) { var map = new SourceMapGenerator(); var line = 1; var column = 0; var generated = { line: 1, column: 0 }; var original = { line: 0, // should be zero to add first mapping column: 0 }; var sourceMappingActive = false; var activatedGenerated = { line: 1, column: 0 }; var activatedMapping = { generated: activatedGenerated }; var handlersNode = handlers.node; handlers.node = function(node) { if (node.loc && node.loc.start && trackNodes.hasOwnProperty(node.type)) { var nodeLine = node.loc.start.line; var nodeColumn = node.loc.start.column - 1; if (original.line !== nodeLine || original.column !== nodeColumn) { original.line = nodeLine; original.column = nodeColumn; generated.line = line; generated.column = column; if (sourceMappingActive) { sourceMappingActive = false; if (generated.line !== activatedGenerated.line || generated.column !== activatedGenerated.column) { map.addMapping(activatedMapping); } } sourceMappingActive = true; map.addMapping({ source: node.loc.source, original: original, generated: generated }); } } handlersNode.call(this, node); if (sourceMappingActive && trackNodes.hasOwnProperty(node.type)) { activatedGenerated.line = line; activatedGenerated.column = column; } }; var handlersChunk = handlers.chunk; handlers.chunk = function(chunk) { for (var i = 0; i < chunk.length; i++) { if (chunk.charCodeAt(i) === 10) { // \n line++; column = 0; } else { column++; } } handlersChunk(chunk); }; var handlersResult = handlers.result; handlers.result = function() { if (sourceMappingActive) { map.addMapping(activatedMapping); } return { css: handlersResult(), map: map }; }; return handlers; };
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 3
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
create.js
1.57 KB
lrw-r--r--
1985-10-26 08:15:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
index.js
135 B
lrw-r--r--
1985-10-26 08:15:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
sourceMap.js
2.56 KB
lrw-r--r--
1985-10-26 08:15:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).