Spaces:
Running
Running
File size: 483 Bytes
95f4e64 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
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();
}
|