scroll/src/scroll.ts

26 lines
417 B
JavaScript

/**
* 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;
}
const { main } = await import(`./${RUNTIME}/index.ts`);
await main();
})();