Add node modules and new code for release (#39)
Co-authored-by: tbarnes94 <tbarnes94@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
a10d84bc2e
commit
7ad2aa66bb
42
node_modules/@babel/helper-module-transforms/lib/get-module-name.js
generated
vendored
Normal file
42
node_modules/@babel/helper-module-transforms/lib/get-module-name.js
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = getModuleName;
|
||||
|
||||
function getModuleName(rootOpts, pluginOpts) {
|
||||
var _pluginOpts$moduleRoo, _rootOpts$moduleIds, _rootOpts$moduleRoot;
|
||||
|
||||
const {
|
||||
filename,
|
||||
filenameRelative = filename,
|
||||
sourceRoot = (_pluginOpts$moduleRoo = pluginOpts.moduleRoot) != null ? _pluginOpts$moduleRoo : rootOpts.moduleRoot
|
||||
} = rootOpts;
|
||||
const {
|
||||
moduleId = rootOpts.moduleId,
|
||||
moduleIds = (_rootOpts$moduleIds = rootOpts.moduleIds) != null ? _rootOpts$moduleIds : !!moduleId,
|
||||
getModuleId = rootOpts.getModuleId,
|
||||
moduleRoot = (_rootOpts$moduleRoot = rootOpts.moduleRoot) != null ? _rootOpts$moduleRoot : sourceRoot
|
||||
} = pluginOpts;
|
||||
if (!moduleIds) return null;
|
||||
|
||||
if (moduleId != null && !getModuleId) {
|
||||
return moduleId;
|
||||
}
|
||||
|
||||
let moduleName = moduleRoot != null ? moduleRoot + "/" : "";
|
||||
|
||||
if (filenameRelative) {
|
||||
const sourceRootReplacer = sourceRoot != null ? new RegExp("^" + sourceRoot + "/?") : "";
|
||||
moduleName += filenameRelative.replace(sourceRootReplacer, "").replace(/\.(\w*?)$/, "");
|
||||
}
|
||||
|
||||
moduleName = moduleName.replace(/\\/g, "/");
|
||||
|
||||
if (getModuleId) {
|
||||
return getModuleId(moduleName) || moduleName;
|
||||
} else {
|
||||
return moduleName;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user