index.js 5.7 KB

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