summaryrefslogtreecommitdiff
path: root/js/main.ts
diff options
context:
space:
mode:
authorKitson Kelly <me@kitsonkelly.com>2018-07-22 03:14:52 +0200
committerBert Belder <bertbelder@gmail.com>2018-07-22 03:16:17 +0200
commit845f7215dbde5c4fa448d201c9f7ebbe986eedba (patch)
tree80ec819df0a5241fd5db1b28642d73a028c55fb0 /js/main.ts
parentdff5c16e85b9ee7e610d17792f8c301af1a9c458 (diff)
Replace packer with rollup
Diffstat (limited to 'js/main.ts')
-rw-r--r--js/main.ts8
1 files changed, 3 insertions, 5 deletions
diff --git a/js/main.ts b/js/main.ts
index c140304ef..728c46e80 100644
--- a/js/main.ts
+++ b/js/main.ts
@@ -5,9 +5,6 @@ import { deno as fbs } from "./msg_generated";
import { assert, log } from "./util";
import * as runtime from "./runtime";
-const globalEval = eval;
-const window = globalEval("this");
-
let cmdIdCounter = 0;
function assignCmdId(): number {
// TODO(piscisaureus) Safely re-use so they don't overflow.
@@ -27,7 +24,8 @@ function startMsg(cmdId: number): Uint8Array {
return builder.asUint8Array();
}
-window["denoMain"] = () => {
+/* tslint:disable-next-line:no-default-export */
+export default function denoMain() {
// First we send an empty "Start" message to let the privlaged side know we
// are ready. The response should be a "StartRes" message containing the CLI
// argv and other info.
@@ -61,4 +59,4 @@ window["denoMain"] = () => {
const inputFn = argv[1];
const mod = runtime.resolveModule(inputFn, `${cwd}/`);
mod.compileAndRun();
-};
+}