scroll/src/scroll.ts

26 lines
417 B
JavaScript
Raw Normal View History

2023-10-27 12:11:48 -04:00
/**
* The starting point for running scroll
*/
export enum RunTime {
Bun = 'bun',
Deno = 'deno',
Unknown = 'common',
}
/**
* Determine the runtime strategy, and go!
*/
(async () => {
let RUNTIME = RunTime.Unknown;
if ('Deno' in globalThis) {
RUNTIME = RunTime.Deno;
}
if ('Bun' in globalThis) {
RUNTIME = RunTime.Bun;
}
2023-10-31 14:47:59 -04:00
const { main } = await import(`./${RUNTIME}/index.ts`);
await main();
2023-10-27 12:11:48 -04:00
})();