1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-24 15:19:26 -05:00

Minor clean up

This commit is contained in:
Ryan Dahl 2018-05-14 03:12:36 -04:00
parent 6f59a9588b
commit 7828d7fd7a
3 changed files with 5 additions and 5 deletions

View file

@ -60,6 +60,7 @@ func main() {
} }
err = worker.SendBytes(out) err = worker.SendBytes(out)
if err != nil { if err != nil {
panic(err) os.Stderr.WriteString(err.Error())
os.Exit(1)
} }
} }

View file

@ -20,7 +20,6 @@ function readFileSync(filename: string): string {
} }
function load(argv: string[]): void { function load(argv: string[]): void {
console.log("Load argv", argv);
const inputFn = argv[1]; const inputFn = argv[1];
const source = readFileSync(inputFn); const source = readFileSync(inputFn);
console.log("source", source); console.log("source", source);
@ -37,5 +36,3 @@ V8Worker2.recv((ab: ArrayBuffer) => {
break; break;
} }
}); });
V8Worker2.print("Hello");

View file

@ -8,6 +8,8 @@ const globalEval = eval;
// A reference to the global object. // A reference to the global object.
const _global = globalEval("this"); const _global = globalEval("this");
const print = V8Worker2.print;
_global["console"] = { _global["console"] = {
// tslint:disable-next-line:no-any // tslint:disable-next-line:no-any
log(...args: any[]): void { log(...args: any[]): void {
@ -19,6 +21,6 @@ _global["console"] = {
out.push(JSON.stringify(a)); out.push(JSON.stringify(a));
} }
} }
V8Worker2.print(out.join(" ")); print(out.join(" "));
} }
}; };