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