Files
portfolio/node_modules/.cache/babel-loader/8bff393b91f4bdc9377ef49048d61190.json
2021-09-20 16:54:47 -04:00

1 line
4.0 KiB
JSON

{"ast":null,"code":"'use strict';\n\nvar glob = require('glob');\n\nvar path = require('path');\n\nfunction trueCasePathSync(fsPath) {\n // Normalize the path so as to resolve . and .. components.\n // !! As of Node v4.1.1, a path starting with ../ is NOT resolved relative\n // !! to the current dir, and glob.sync() below then fails.\n // !! When in doubt, resolve with fs.realPathSync() *beforehand*.\n var fsPathNormalized = path.normalize(fsPath); // OSX: HFS+ stores filenames in NFD (decomposed normal form) Unicode format,\n // so we must ensure that the input path is in that format first.\n\n if (process.platform === 'darwin') fsPathNormalized = fsPathNormalized.normalize('NFD'); // !! Windows: Curiously, the drive component mustn't be part of a glob,\n // !! otherwise glob.sync() will invariably match nothing.\n // !! Thus, we remove the drive component and instead pass it in as the 'cwd'\n // !! (working dir.) property below.\n\n var pathRoot = path.parse(fsPathNormalized).root;\n var noDrivePath = fsPathNormalized.slice(Math.max(pathRoot.length - 1, 0)); // Perform case-insensitive globbing (on Windows, relative to the drive /\n // network share) and return the 1st match, if any.\n // Fortunately, glob() with nocase case-corrects the input even if it is\n // a *literal* path.\n\n return glob.sync(noDrivePath, {\n nocase: true,\n cwd: pathRoot\n })[0];\n}\n\nmodule.exports = trueCasePathSync;","map":{"version":3,"sources":["/Users/tylerkoenig/Code/personal/react-scss2/node_modules/true-case-path/index.js"],"names":["glob","require","path","trueCasePathSync","fsPath","fsPathNormalized","normalize","process","platform","pathRoot","parse","root","noDrivePath","slice","Math","max","length","sync","nocase","cwd","module","exports"],"mappings":"AAAA;;AAEA,IAAIA,IAAI,GAAGC,OAAO,CAAC,MAAD,CAAlB;;AACA,IAAIC,IAAI,GAAGD,OAAO,CAAC,MAAD,CAAlB;;AAEA,SAASE,gBAAT,CAA0BC,MAA1B,EAAkC;AAEhC;AACA;AACA;AACA;AACA,MAAIC,gBAAgB,GAAGH,IAAI,CAACI,SAAL,CAAeF,MAAf,CAAvB,CANgC,CAQhC;AACA;;AACA,MAAIG,OAAO,CAACC,QAAR,KAAqB,QAAzB,EAAmCH,gBAAgB,GAAGA,gBAAgB,CAACC,SAAjB,CAA2B,KAA3B,CAAnB,CAVH,CAYhC;AACA;AACA;AACA;;AACA,MAAIG,QAAQ,GAAGP,IAAI,CAACQ,KAAL,CAAWL,gBAAX,EAA6BM,IAA5C;AACA,MAAIC,WAAW,GAAGP,gBAAgB,CAACQ,KAAjB,CAAuBC,IAAI,CAACC,GAAL,CAASN,QAAQ,CAACO,MAAT,GAAkB,CAA3B,EAA8B,CAA9B,CAAvB,CAAlB,CAjBgC,CAmBhC;AACA;AACA;AACA;;AACA,SAAOhB,IAAI,CAACiB,IAAL,CAAUL,WAAV,EAAuB;AAAEM,IAAAA,MAAM,EAAE,IAAV;AAAgBC,IAAAA,GAAG,EAAEV;AAArB,GAAvB,EAAwD,CAAxD,CAAP;AACD;;AAEDW,MAAM,CAACC,OAAP,GAAiBlB,gBAAjB","sourcesContent":["'use strict'\r\n\r\nvar glob = require('glob')\r\nvar path = require('path')\r\n\r\nfunction trueCasePathSync(fsPath) {\r\n\r\n // Normalize the path so as to resolve . and .. components.\r\n // !! As of Node v4.1.1, a path starting with ../ is NOT resolved relative\r\n // !! to the current dir, and glob.sync() below then fails.\r\n // !! When in doubt, resolve with fs.realPathSync() *beforehand*.\r\n var fsPathNormalized = path.normalize(fsPath)\r\n\r\n // OSX: HFS+ stores filenames in NFD (decomposed normal form) Unicode format,\r\n // so we must ensure that the input path is in that format first.\r\n if (process.platform === 'darwin') fsPathNormalized = fsPathNormalized.normalize('NFD')\r\n\r\n // !! Windows: Curiously, the drive component mustn't be part of a glob,\r\n // !! otherwise glob.sync() will invariably match nothing.\r\n // !! Thus, we remove the drive component and instead pass it in as the 'cwd'\r\n // !! (working dir.) property below.\r\n var pathRoot = path.parse(fsPathNormalized).root\r\n var noDrivePath = fsPathNormalized.slice(Math.max(pathRoot.length - 1, 0))\r\n\r\n // Perform case-insensitive globbing (on Windows, relative to the drive /\r\n // network share) and return the 1st match, if any.\r\n // Fortunately, glob() with nocase case-corrects the input even if it is\r\n // a *literal* path.\r\n return glob.sync(noDrivePath, { nocase: true, cwd: pathRoot })[0]\r\n}\r\n\r\nmodule.exports = trueCasePathSync\r\n"]},"metadata":{},"sourceType":"script"}