mirror of
https://github.com/denoland/deno.git
synced 2025-03-03 17:34:47 -05:00
Rationalise startup for compiler/main (#1737)
This commit is contained in:
parent
1e837f3281
commit
90c7af27d7
3 changed files with 3 additions and 12 deletions
|
@ -6,7 +6,6 @@ import { Console } from "./console";
|
|||
import { globalEval } from "./global_eval";
|
||||
import { libdeno } from "./libdeno";
|
||||
import * as os from "./os";
|
||||
import { args } from "./deno";
|
||||
import { TextDecoder, TextEncoder } from "./text_encoding";
|
||||
import { clearTimer, setTimeout } from "./timers";
|
||||
import { postMessage, workerClose, workerMain } from "./workers";
|
||||
|
@ -542,13 +541,5 @@ window.compilerMain = function compilerMain() {
|
|||
|
||||
/* tslint:disable-next-line:no-default-export */
|
||||
export default function denoMain() {
|
||||
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);
|
||||
os.start("TS");
|
||||
}
|
||||
|
|
|
@ -39,8 +39,6 @@ export default function denoMain() {
|
|||
os.exit(0);
|
||||
}
|
||||
|
||||
os.setGlobals(startResMsg.pid(), startResMsg.noColor());
|
||||
|
||||
const cwd = startResMsg.cwd();
|
||||
log("cwd", cwd);
|
||||
|
||||
|
|
2
js/os.ts
2
js/os.ts
|
@ -192,5 +192,7 @@ export function start(source?: string): msg.StartRes {
|
|||
|
||||
util.setLogDebug(startResMsg.debugFlag(), source);
|
||||
|
||||
setGlobals(startResMsg.pid(), startResMsg.noColor());
|
||||
|
||||
return startResMsg;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue