index.js 5.8 KB

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