scroll/src/scroll.ts

25 lines
412 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;
const { main } = await import('./deno/index.ts');
await main();
}
if ('Bun' in globalThis) {
RUNTIME = RunTime.Bun;
}
2023-10-27 12:11:48 -04:00
})();