You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							30 lines
						
					
					
						
							632 B
						
					
					
				
			
		
		
	
	
							30 lines
						
					
					
						
							632 B
						
					
					
				"use strict";
 | 
						|
 | 
						|
const babelP = import("./lib/index.js");
 | 
						|
 | 
						|
const functionNames = [
 | 
						|
  "createConfigItem",
 | 
						|
  "loadPartialConfig",
 | 
						|
  "loadOptions",
 | 
						|
  "transform",
 | 
						|
  "transformFile",
 | 
						|
  "transformFromAst",
 | 
						|
  "parse",
 | 
						|
];
 | 
						|
 | 
						|
for (const name of functionNames) {
 | 
						|
  exports[`${name}Sync`] = function () {
 | 
						|
    throw new Error(
 | 
						|
      `"${name}Sync" is not supported when loading @babel/core using require()`
 | 
						|
    );
 | 
						|
  };
 | 
						|
  exports[name] = function (...args) {
 | 
						|
    babelP.then(babel => {
 | 
						|
      babel[name](...args);
 | 
						|
    });
 | 
						|
  };
 | 
						|
  exports[`${name}Async`] = function (...args) {
 | 
						|
    return babelP.then(babel => babel[`${name}Async`](...args));
 | 
						|
  };
 | 
						|
}
 |