Ignore:
Timestamp:
11/25/21 22:08:24 (3 years ago)
Author:
Ema <ema_spirova@…>
Branches:
master
Children:
8d391a1
Parents:
59329aa
Message:

primeNG components

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trip-planner-front/node_modules/mini-css-extract-plugin/dist/utils.js

    r59329aa re29cc2e  
    99exports.compareModulesByIdentifier = compareModulesByIdentifier;
    1010exports.stringifyRequest = stringifyRequest;
    11 exports.AUTO_PUBLIC_PATH = exports.MODULE_TYPE = void 0;
     11exports.getUndoPath = getUndoPath;
     12exports.SINGLE_DOT_PATH_SEGMENT = exports.ABSOLUTE_PUBLIC_PATH = exports.AUTO_PUBLIC_PATH = exports.MODULE_TYPE = void 0;
    1213
    1314var _module = _interopRequireDefault(require("module"));
     
    7273const MODULE_TYPE = "css/mini-extract";
    7374exports.MODULE_TYPE = MODULE_TYPE;
    74 const AUTO_PUBLIC_PATH = "__MINI_CSS_EXTRACT_PLUGIN_PUBLIC_PATH__";
     75const AUTO_PUBLIC_PATH = "__mini_css_extract_plugin_public_path_auto__";
    7576exports.AUTO_PUBLIC_PATH = AUTO_PUBLIC_PATH;
     77const ABSOLUTE_PUBLIC_PATH = "webpack:///mini-css-extract-plugin/";
     78exports.ABSOLUTE_PUBLIC_PATH = ABSOLUTE_PUBLIC_PATH;
     79const SINGLE_DOT_PATH_SEGMENT = "__mini_css_extract_plugin_single_dot_path_segment__";
     80exports.SINGLE_DOT_PATH_SEGMENT = SINGLE_DOT_PATH_SEGMENT;
    7681
    7782function isAbsolutePath(str) {
     
    115120  }).join("!"));
    116121}
     122
     123function getUndoPath(filename, outputPath, enforceRelative) {
     124  let depth = -1;
     125  let append = ""; // eslint-disable-next-line no-param-reassign
     126
     127  outputPath = outputPath.replace(/[\\/]$/, "");
     128
     129  for (const part of filename.split(/[/\\]+/)) {
     130    if (part === "..") {
     131      if (depth > -1) {
     132        // eslint-disable-next-line no-plusplus
     133        depth--;
     134      } else {
     135        const i = outputPath.lastIndexOf("/");
     136        const j = outputPath.lastIndexOf("\\");
     137        const pos = i < 0 ? j : j < 0 ? i : Math.max(i, j);
     138
     139        if (pos < 0) {
     140          return `${outputPath}/`;
     141        }
     142
     143        append = `${outputPath.slice(pos + 1)}/${append}`; // eslint-disable-next-line no-param-reassign
     144
     145        outputPath = outputPath.slice(0, pos);
     146      }
     147    } else if (part !== ".") {
     148      // eslint-disable-next-line no-plusplus
     149      depth++;
     150    }
     151  }
     152
     153  return depth > 0 ? `${"../".repeat(depth)}${append}` : enforceRelative ? `./${append}` : append;
     154}
Note: See TracChangeset for help on using the changeset viewer.