xnr
Version:
Easily, quickly and reliably run a Node.js script from the CLI.
19 lines (18 loc) • 911 B
TypeScript
import { Output } from "./calcOutput";
import { SucraseOptions } from "./utils";
export { type Output } from "./calcOutput";
export { run, type RunConfig } from "./run";
export { transform } from "./transform";
/**
* Converts all local source code starting from an entry file into a directly runnable directory of Node.js compatible code.
*
* @param {Object} options - The options for building the code.
* @param {string} options.filePath - The path of the entry file.
* @param {string} options.outputDirectory - The directory where the output files will be saved.
* @returns {Promise<Output>} A promise that resolves with the output files and their contents, with an entrypoint.
*/
export declare const build: ({ filePath, outputDirectory, getSucraseOptions, }: {
filePath: string;
outputDirectory: string;
getSucraseOptions?: (absFilePath: string) => SucraseOptions;
}) => Promise<Output>;