123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240 |
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.Plugin = Plugin;
- Object.defineProperty(exports, "File", {
- enumerable: true,
- get: function () {
- return _file.default;
- }
- });
- Object.defineProperty(exports, "buildExternalHelpers", {
- enumerable: true,
- get: function () {
- return _buildExternalHelpers.default;
- }
- });
- Object.defineProperty(exports, "resolvePlugin", {
- enumerable: true,
- get: function () {
- return _files.resolvePlugin;
- }
- });
- Object.defineProperty(exports, "resolvePreset", {
- enumerable: true,
- get: function () {
- return _files.resolvePreset;
- }
- });
- Object.defineProperty(exports, "version", {
- enumerable: true,
- get: function () {
- return _package.version;
- }
- });
- Object.defineProperty(exports, "getEnv", {
- enumerable: true,
- get: function () {
- return _environment.getEnv;
- }
- });
- Object.defineProperty(exports, "tokTypes", {
- enumerable: true,
- get: function () {
- return _parser().tokTypes;
- }
- });
- Object.defineProperty(exports, "traverse", {
- enumerable: true,
- get: function () {
- return _traverse().default;
- }
- });
- Object.defineProperty(exports, "template", {
- enumerable: true,
- get: function () {
- return _template().default;
- }
- });
- Object.defineProperty(exports, "createConfigItem", {
- enumerable: true,
- get: function () {
- return _item.createConfigItem;
- }
- });
- Object.defineProperty(exports, "loadPartialConfig", {
- enumerable: true,
- get: function () {
- return _config.loadPartialConfig;
- }
- });
- Object.defineProperty(exports, "loadOptions", {
- enumerable: true,
- get: function () {
- return _config.loadOptions;
- }
- });
- Object.defineProperty(exports, "transform", {
- enumerable: true,
- get: function () {
- return _transform.transform;
- }
- });
- Object.defineProperty(exports, "transformSync", {
- enumerable: true,
- get: function () {
- return _transform.transformSync;
- }
- });
- Object.defineProperty(exports, "transformAsync", {
- enumerable: true,
- get: function () {
- return _transform.transformAsync;
- }
- });
- Object.defineProperty(exports, "transformFile", {
- enumerable: true,
- get: function () {
- return _transformFile.transformFile;
- }
- });
- Object.defineProperty(exports, "transformFileSync", {
- enumerable: true,
- get: function () {
- return _transformFile.transformFileSync;
- }
- });
- Object.defineProperty(exports, "transformFileAsync", {
- enumerable: true,
- get: function () {
- return _transformFile.transformFileAsync;
- }
- });
- Object.defineProperty(exports, "transformFromAst", {
- enumerable: true,
- get: function () {
- return _transformAst.transformFromAst;
- }
- });
- Object.defineProperty(exports, "transformFromAstSync", {
- enumerable: true,
- get: function () {
- return _transformAst.transformFromAstSync;
- }
- });
- Object.defineProperty(exports, "transformFromAstAsync", {
- enumerable: true,
- get: function () {
- return _transformAst.transformFromAstAsync;
- }
- });
- Object.defineProperty(exports, "parse", {
- enumerable: true,
- get: function () {
- return _parse.parse;
- }
- });
- Object.defineProperty(exports, "parseSync", {
- enumerable: true,
- get: function () {
- return _parse.parseSync;
- }
- });
- Object.defineProperty(exports, "parseAsync", {
- enumerable: true,
- get: function () {
- return _parse.parseAsync;
- }
- });
- exports.types = exports.OptionManager = exports.DEFAULT_EXTENSIONS = void 0;
- var _file = _interopRequireDefault(require("./transformation/file/file"));
- var _buildExternalHelpers = _interopRequireDefault(require("./tools/build-external-helpers"));
- var _files = require("./config/files");
- var _package = require("../package.json");
- var _environment = require("./config/helpers/environment");
- function _types() {
- const data = _interopRequireWildcard(require("@babel/types"));
- _types = function () {
- return data;
- };
- return data;
- }
- Object.defineProperty(exports, "types", {
- enumerable: true,
- get: function () {
- return _types();
- }
- });
- function _parser() {
- const data = require("@babel/parser");
- _parser = function () {
- return data;
- };
- return data;
- }
- function _traverse() {
- const data = _interopRequireDefault(require("@babel/traverse"));
- _traverse = function () {
- return data;
- };
- return data;
- }
- function _template() {
- const data = _interopRequireDefault(require("@babel/template"));
- _template = function () {
- return data;
- };
- return data;
- }
- var _item = require("./config/item");
- var _config = require("./config");
- var _transform = require("./transform");
- var _transformFile = require("./transform-file");
- var _transformAst = require("./transform-ast");
- var _parse = require("./parse");
- function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- const DEFAULT_EXTENSIONS = Object.freeze([".js", ".jsx", ".es6", ".es", ".mjs"]);
- exports.DEFAULT_EXTENSIONS = DEFAULT_EXTENSIONS;
- class OptionManager {
- init(opts) {
- return (0, _config.loadOptions)(opts);
- }
- }
- exports.OptionManager = OptionManager;
- function Plugin(alias) {
- throw new Error(`The (${alias}) Babel 5 plugin is being run with an unsupported Babel version.`);
- }
|