summaryrefslogtreecommitdiff
path: root/node_modules/@babel/cli/lib/babel-external-helpers.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/@babel/cli/lib/babel-external-helpers.js')
-rw-r--r--node_modules/@babel/cli/lib/babel-external-helpers.js20
1 files changed, 12 insertions, 8 deletions
diff --git a/node_modules/@babel/cli/lib/babel-external-helpers.js b/node_modules/@babel/cli/lib/babel-external-helpers.js
index e4932b19..78e7bc9f 100644
--- a/node_modules/@babel/cli/lib/babel-external-helpers.js
+++ b/node_modules/@babel/cli/lib/babel-external-helpers.js
@@ -1,8 +1,8 @@
"use strict";
-function _commander() {
- const data = require("commander");
- _commander = function () {
+function commander() {
+ const data = _interopRequireWildcard(require("commander"), true);
+ commander = function () {
return data;
};
return data;
@@ -14,6 +14,9 @@ function _core() {
};
return data;
}
+function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
+function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
+const program = commander().default.program;
function collect(value, previousValue) {
if (typeof value !== "string") return previousValue;
const values = value.split(",");
@@ -23,10 +26,11 @@ function collect(value, previousValue) {
}
return values;
}
-_commander().option("-l, --whitelist [whitelist]", "Whitelist of helpers to ONLY include", collect);
-_commander().option("-t, --output-type [type]", "Type of output (global|umd|var)", "global");
-_commander().usage("[options]");
-_commander().parse(process.argv);
-console.log((0, _core().buildExternalHelpers)(_commander().whitelist, _commander().outputType));
+program.option("-l, --whitelist [whitelist]", "Whitelist of helpers to ONLY include", collect);
+program.option("-t, --output-type [type]", "Type of output (global|umd|var)", "global");
+program.usage("[options]");
+program.parse(process.argv);
+const opts = program.opts();
+console.log((0, _core().buildExternalHelpers)(opts.whitelist, opts.outputType));
//# sourceMappingURL=babel-external-helpers.js.map