diff options
author | Kevin (Kun) "Kassimo" Qian <kevinkassimo@gmail.com> | 2019-05-03 13:24:09 -0700 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2019-05-03 16:24:09 -0400 |
commit | 36081171323e266760db8bed2f31a6e3be7d8839 (patch) | |
tree | 6f4dc276656c7b119fc5efad5368e847f9cf7f19 /js/main.ts | |
parent | 401a5c021141d4ba5a71078b28f6daefcd1826a6 (diff) |
feat(cli cmd): deno xeval (#2260)
Diffstat (limited to 'js/main.ts')
-rw-r--r-- | js/main.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/js/main.ts b/js/main.ts index ad9e0e99d..cb27690b5 100644 --- a/js/main.ts +++ b/js/main.ts @@ -9,7 +9,9 @@ import { assert, log } from "./util"; import * as os from "./os"; import { args } from "./deno"; import { replLoop } from "./repl"; +import { xevalMain, XevalFunc } from "./xeval"; import { setVersions } from "./version"; +import { window } from "./window"; import { setLocation } from "./location"; // builtin modules @@ -43,7 +45,9 @@ export default function denoMain(name?: string): void { log("args", args); Object.freeze(args); - if (!mainModule) { + if (window["_xevalWrapper"] !== undefined) { + xevalMain(window["_xevalWrapper"] as XevalFunc, startResMsg.xevalDelim()); + } else if (!mainModule) { replLoop(); } } |