summaryrefslogtreecommitdiff
path: root/main.ts
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2018-06-22 14:23:42 +0200
committerGitHub <noreply@github.com>2018-06-22 14:23:42 +0200
commit86354a29a40fb97e334f951428239ab8e171e2dd (patch)
tree2f0d8cc2680aa4ccbaf865b427976b3f810b6920 /main.ts
parentef9dc2464e10510bdcc4be9eae431e3dcf7f7999 (diff)
Delete go implementation (#276)
The go prototype will remain at https://github.com/ry/deno/tree/golang
Diffstat (limited to 'main.ts')
-rw-r--r--main.ts54
1 files changed, 0 insertions, 54 deletions
diff --git a/main.ts b/main.ts
deleted file mode 100644
index f72d69cc1..000000000
--- a/main.ts
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright 2018 Ryan Dahl <ry@tinyclouds.org>
-// All rights reserved. MIT License.
-// This allows us to have async/await in our code. It must be loaded first.
-import "babel-polyfill";
-
-import * as dispatch from "./dispatch";
-import { deno as pb } from "./msg.pb";
-
-import * as runtime from "./runtime";
-import * as util from "./util";
-
-import { initTimers } from "./timers";
-import { initFetch } from "./fetch";
-
-// To control internal logging output
-// Set with the -debug command-line flag.
-export let debug = false;
-let startCalled = false;
-
-// denoMain is needed to allow hooks into the system.
-// Also eventual snapshot support needs it.
-// tslint:disable-next-line:no-any
-(window as any)["denoMain"] = () => {
- // tslint:disable-next-line:no-any
- delete (window as any)["denoMain"];
-
- initTimers();
- initFetch();
-
- dispatch.sub("start", (payload: Uint8Array) => {
- if (startCalled) {
- throw Error("start message received more than once!");
- }
- startCalled = true;
-
- const msg = pb.Msg.decode(payload);
- const {
- startCwd: cwd,
- startArgv: argv,
- startDebugFlag: debugFlag,
- startMainJs: mainJs,
- startMainMap: mainMap
- } = msg;
-
- debug = debugFlag;
- util.log("start", { cwd, argv, debugFlag });
-
- runtime.setup(mainJs, mainMap);
-
- const inputFn = argv[0];
- const mod = runtime.resolveModule(inputFn, `${cwd}/`);
- mod.compileAndRun();
- });
-};