Refactor to prepare for implementing input and output streams to the terminal
This commit is contained in:
parent
2fcfe4328c
commit
19e44261a4
0
src/bun/terminal_io.ts
Normal file
0
src/bun/terminal_io.ts
Normal file
6
src/common/editor.ts
Normal file
6
src/common/editor.ts
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
export class Editor {
|
||||||
|
constructor() {
|
||||||
|
}
|
||||||
|
public processKeyPress(): void {
|
||||||
|
}
|
||||||
|
}
|
@ -1,3 +1,10 @@
|
|||||||
|
import { importForRuntime } from './runtime.ts';
|
||||||
|
|
||||||
export * from './runtime.ts';
|
export * from './runtime.ts';
|
||||||
export * from './strings.ts';
|
export * from './strings.ts';
|
||||||
export type { ITestBase } from './test_base.ts';
|
export type { ITestBase } from './test_base.ts';
|
||||||
|
|
||||||
|
export async function main() {
|
||||||
|
const { main } = await importForRuntime('./mod.ts');
|
||||||
|
await main();
|
||||||
|
}
|
||||||
|
@ -6,7 +6,7 @@ t.test('chars fn properly splits strings into unicode characters', () => {
|
|||||||
t.assertEquals(chars('😺😸😹'), ['😺', '😸', '😹']);
|
t.assertEquals(chars('😺😸😹'), ['😺', '😸', '😹']);
|
||||||
});
|
});
|
||||||
|
|
||||||
t.test('is_ascii properly descerns ascii chars', () => {
|
t.test('is_ascii properly discerns ascii chars', () => {
|
||||||
t.assertTrue(is_ascii('asjyverkjhsdf1928374'));
|
t.assertTrue(is_ascii('asjyverkjhsdf1928374'));
|
||||||
t.assertFalse(is_ascii('😺acalskjsdf'));
|
t.assertFalse(is_ascii('😺acalskjsdf'));
|
||||||
});
|
});
|
||||||
|
0
src/common/terminal_io.ts
Normal file
0
src/common/terminal_io.ts
Normal file
0
src/deno/terminal_io.ts
Normal file
0
src/deno/terminal_io.ts
Normal file
@ -1,19 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* The starting point for running scroll
|
* The starting point for running scroll
|
||||||
*/
|
*/
|
||||||
|
import { main } from './common/mod.ts';
|
||||||
export enum RunTime {
|
|
||||||
Bun = 'bun',
|
|
||||||
Deno = 'deno',
|
|
||||||
Unknown = 'common',
|
|
||||||
}
|
|
||||||
|
|
||||||
import { importForRuntime } from './common/mod.ts';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine the runtime strategy, and go!
|
* Start the event loop
|
||||||
*/
|
*/
|
||||||
(async () => {
|
|
||||||
const { main } = await importForRuntime('./mod.ts');
|
|
||||||
await main();
|
await main();
|
||||||
})();
|
|
||||||
|
Loading…
Reference in New Issue
Block a user