UNPKG

6.58 kBJavaScriptView Raw
1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.Plugin = Plugin;
7Object.defineProperty(exports, "File", {
8 enumerable: true,
9 get: function () {
10 return _file.default;
11 }
12});
13Object.defineProperty(exports, "buildExternalHelpers", {
14 enumerable: true,
15 get: function () {
16 return _buildExternalHelpers.default;
17 }
18});
19Object.defineProperty(exports, "resolvePlugin", {
20 enumerable: true,
21 get: function () {
22 return _files.resolvePlugin;
23 }
24});
25Object.defineProperty(exports, "resolvePreset", {
26 enumerable: true,
27 get: function () {
28 return _files.resolvePreset;
29 }
30});
31Object.defineProperty(exports, "getEnv", {
32 enumerable: true,
33 get: function () {
34 return _environment.getEnv;
35 }
36});
37Object.defineProperty(exports, "tokTypes", {
38 enumerable: true,
39 get: function () {
40 return _parser().tokTypes;
41 }
42});
43Object.defineProperty(exports, "traverse", {
44 enumerable: true,
45 get: function () {
46 return _traverse().default;
47 }
48});
49Object.defineProperty(exports, "template", {
50 enumerable: true,
51 get: function () {
52 return _template().default;
53 }
54});
55Object.defineProperty(exports, "createConfigItem", {
56 enumerable: true,
57 get: function () {
58 return _item.createConfigItem;
59 }
60});
61Object.defineProperty(exports, "loadPartialConfig", {
62 enumerable: true,
63 get: function () {
64 return _config.loadPartialConfig;
65 }
66});
67Object.defineProperty(exports, "loadPartialConfigSync", {
68 enumerable: true,
69 get: function () {
70 return _config.loadPartialConfigSync;
71 }
72});
73Object.defineProperty(exports, "loadPartialConfigAsync", {
74 enumerable: true,
75 get: function () {
76 return _config.loadPartialConfigAsync;
77 }
78});
79Object.defineProperty(exports, "loadOptions", {
80 enumerable: true,
81 get: function () {
82 return _config.loadOptions;
83 }
84});
85Object.defineProperty(exports, "loadOptionsSync", {
86 enumerable: true,
87 get: function () {
88 return _config.loadOptionsSync;
89 }
90});
91Object.defineProperty(exports, "loadOptionsAsync", {
92 enumerable: true,
93 get: function () {
94 return _config.loadOptionsAsync;
95 }
96});
97Object.defineProperty(exports, "transform", {
98 enumerable: true,
99 get: function () {
100 return _transform.transform;
101 }
102});
103Object.defineProperty(exports, "transformSync", {
104 enumerable: true,
105 get: function () {
106 return _transform.transformSync;
107 }
108});
109Object.defineProperty(exports, "transformAsync", {
110 enumerable: true,
111 get: function () {
112 return _transform.transformAsync;
113 }
114});
115Object.defineProperty(exports, "transformFile", {
116 enumerable: true,
117 get: function () {
118 return _transformFile.transformFile;
119 }
120});
121Object.defineProperty(exports, "transformFileSync", {
122 enumerable: true,
123 get: function () {
124 return _transformFile.transformFileSync;
125 }
126});
127Object.defineProperty(exports, "transformFileAsync", {
128 enumerable: true,
129 get: function () {
130 return _transformFile.transformFileAsync;
131 }
132});
133Object.defineProperty(exports, "transformFromAst", {
134 enumerable: true,
135 get: function () {
136 return _transformAst.transformFromAst;
137 }
138});
139Object.defineProperty(exports, "transformFromAstSync", {
140 enumerable: true,
141 get: function () {
142 return _transformAst.transformFromAstSync;
143 }
144});
145Object.defineProperty(exports, "transformFromAstAsync", {
146 enumerable: true,
147 get: function () {
148 return _transformAst.transformFromAstAsync;
149 }
150});
151Object.defineProperty(exports, "parse", {
152 enumerable: true,
153 get: function () {
154 return _parse.parse;
155 }
156});
157Object.defineProperty(exports, "parseSync", {
158 enumerable: true,
159 get: function () {
160 return _parse.parseSync;
161 }
162});
163Object.defineProperty(exports, "parseAsync", {
164 enumerable: true,
165 get: function () {
166 return _parse.parseAsync;
167 }
168});
169exports.types = exports.OptionManager = exports.DEFAULT_EXTENSIONS = exports.version = void 0;
170
171var _file = _interopRequireDefault(require("./transformation/file/file"));
172
173var _buildExternalHelpers = _interopRequireDefault(require("./tools/build-external-helpers"));
174
175var _files = require("./config/files");
176
177var _environment = require("./config/helpers/environment");
178
179function _types() {
180 const data = _interopRequireWildcard(require("@babel/types"));
181
182 _types = function () {
183 return data;
184 };
185
186 return data;
187}
188
189Object.defineProperty(exports, "types", {
190 enumerable: true,
191 get: function () {
192 return _types();
193 }
194});
195
196function _parser() {
197 const data = require("@babel/parser");
198
199 _parser = function () {
200 return data;
201 };
202
203 return data;
204}
205
206function _traverse() {
207 const data = _interopRequireDefault(require("@babel/traverse"));
208
209 _traverse = function () {
210 return data;
211 };
212
213 return data;
214}
215
216function _template() {
217 const data = _interopRequireDefault(require("@babel/template"));
218
219 _template = function () {
220 return data;
221 };
222
223 return data;
224}
225
226var _item = require("./config/item");
227
228var _config = require("./config");
229
230var _transform = require("./transform");
231
232var _transformFile = require("./transform-file");
233
234var _transformAst = require("./transform-ast");
235
236var _parse = require("./parse");
237
238function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
239
240function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
241
242function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
243
244const version = "7.12.17";
245exports.version = version;
246const DEFAULT_EXTENSIONS = Object.freeze([".js", ".jsx", ".es6", ".es", ".mjs"]);
247exports.DEFAULT_EXTENSIONS = DEFAULT_EXTENSIONS;
248
249class OptionManager {
250 init(opts) {
251 return (0, _config.loadOptions)(opts);
252 }
253
254}
255
256exports.OptionManager = OptionManager;
257
258function Plugin(alias) {
259 throw new Error(`The (${alias}) Babel 5 plugin is being run with an unsupported Babel version.`);
260}
\No newline at end of file