no1b4me's picture
Upload 5037 files
95f4e64 verified
raw
history blame contribute delete
483 Bytes
import Runner from "./runners/Runner.js";
import Watcher from "./runners/Watcher.js";
export { Runner, Watcher, esrun };
/**
* Run any .ts or .js file
*/
export default async function esrun(inputFile, options) {
if (options?.watch && options?.inspect) {
console.warn(`--inspect and --watch options are not compatible together. Disabling watch mode.`);
options.watch = false;
}
return new (options?.watch ? Watcher : Runner)(inputFile, options).run();
}