mirror of
https://github.com/denoland/deno.git
synced 2024-12-23 07:44:48 -05:00
Set globals on compiler startup (#1735)
This commit is contained in:
parent
1d36eb47eb
commit
fe8c5d358b
1 changed files with 10 additions and 1 deletions
|
@ -6,6 +6,7 @@ import { Console } from "./console";
|
||||||
import { globalEval } from "./global_eval";
|
import { globalEval } from "./global_eval";
|
||||||
import { libdeno } from "./libdeno";
|
import { libdeno } from "./libdeno";
|
||||||
import * as os from "./os";
|
import * as os from "./os";
|
||||||
|
import { args } from "./deno";
|
||||||
import { TextDecoder, TextEncoder } from "./text_encoding";
|
import { TextDecoder, TextEncoder } from "./text_encoding";
|
||||||
import { clearTimer, setTimeout } from "./timers";
|
import { clearTimer, setTimeout } from "./timers";
|
||||||
import { postMessage, workerClose, workerMain } from "./workers";
|
import { postMessage, workerClose, workerMain } from "./workers";
|
||||||
|
@ -540,5 +541,13 @@ window.compilerMain = function compilerMain() {
|
||||||
|
|
||||||
/* tslint:disable-next-line:no-default-export */
|
/* tslint:disable-next-line:no-default-export */
|
||||||
export default function denoMain() {
|
export default function denoMain() {
|
||||||
os.start("TS");
|
const startResMsg = os.start("TS");
|
||||||
|
|
||||||
|
os.setGlobals(startResMsg.pid(), startResMsg.noColor());
|
||||||
|
|
||||||
|
for (let i = 1; i < startResMsg.argvLength(); i++) {
|
||||||
|
args.push(startResMsg.argv(i));
|
||||||
|
}
|
||||||
|
log("args", args);
|
||||||
|
Object.freeze(args);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue