Changeset e29cc2e for trip-planner-front/node_modules/css/lib
- Timestamp:
- 11/25/21 22:08:24 (3 years ago)
- Branches:
- master
- Children:
- 8d391a1
- Parents:
- 59329aa
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trip-planner-front/node_modules/css/lib/stringify/source-map-support.js
r59329aa re29cc2e 7 7 var SourceMapConsumer = require('source-map').SourceMapConsumer; 8 8 var sourceMapResolve = require('source-map-resolve'); 9 var urix = require('urix'); 9 10 var fs = require('fs'); 10 11 var path = require('path'); … … 15 16 16 17 module.exports = mixin; 17 18 /**19 * Ensure Windows-style paths are formatted properly20 */21 22 const makeFriendlyPath = function(aPath) {23 return path.sep === "\\" ? aPath.replace(/\\/g, "/").replace(/^[a-z]:\/?/i, "/") : aPath;24 }25 18 26 19 /** … … 64 57 exports.emit = function(str, pos) { 65 58 if (pos) { 66 var sourceFile = makeFriendlyPath(pos.source || 'source.css');59 var sourceFile = urix(pos.source || 'source.css'); 67 60 68 61 this.map.addMapping({ … … 115 108 var map = new SourceMapConsumer(originalMap.map); 116 109 var relativeTo = originalMap.sourcesRelativeTo; 117 this.map.applySourceMap(map, file, makeFriendlyPath(path.dirname(relativeTo)));110 this.map.applySourceMap(map, file, urix(path.dirname(relativeTo))); 118 111 } 119 112 }
Note:
See TracChangeset
for help on using the changeset viewer.