mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 12:19:12 +00: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 { 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";
|
||||||
|
@ -542,13 +541,5 @@ 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() {
|
||||||
const startResMsg = os.start("TS");
|
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);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,8 +39,6 @@ export default function denoMain() {
|
||||||
os.exit(0);
|
os.exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
os.setGlobals(startResMsg.pid(), startResMsg.noColor());
|
|
||||||
|
|
||||||
const cwd = startResMsg.cwd();
|
const cwd = startResMsg.cwd();
|
||||||
log("cwd", 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);
|
util.setLogDebug(startResMsg.debugFlag(), source);
|
||||||
|
|
||||||
|
setGlobals(startResMsg.pid(), startResMsg.noColor());
|
||||||
|
|
||||||
return startResMsg;
|
return startResMsg;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue