scroll/src/bun/mod.ts

17 lines
321 B
JavaScript
Raw Normal View History

2023-10-31 14:47:59 -04:00
/**
* The main entrypoint when using Bun as the runtime
2023-10-31 14:47:59 -04:00
*/
2023-11-06 18:49:29 -05:00
import { getTermios } from "../common/mod.ts";
export * from './terminal_io.ts';
export async function init() {
2023-11-01 15:25:52 -04:00
const t = await getTermios();
2023-11-06 18:49:29 -05:00
t.enableRawMode();
process.on('exit', () => {
console.info('Disabling raw mode');
2023-11-01 14:00:40 -04:00
t.disableRawMode();
})
2023-11-02 13:06:48 -04:00
}