diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2018-05-21 17:33:33 -0400 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2018-05-21 17:33:33 -0400 |
commit | 8e2e17cdbe02847b19d8bc2002ba713d18e291b9 (patch) | |
tree | 4e6cb105f4ca8857d28e5473894bf53dceeff3cc /main.ts | |
parent | af6076f3c6008d3aacb69ae3eca8db2eb3f00de9 (diff) |
Support source maps for internal code.
Diffstat (limited to 'main.ts')
-rw-r--r-- | main.ts | 18 |
1 files changed, 16 insertions, 2 deletions
@@ -8,10 +8,18 @@ import * as util from "./util"; // Set with the -debug command-line flag. export let debug = false; -function start(cwd: string, argv: string[], debugFlag: boolean): void { +function start( + cwd: string, + argv: string[], + debugFlag: boolean, + mainJs: string, + mainMap: string +): void { debug = debugFlag; util.log("start", { cwd, argv, debugFlag }); + runtime.setup(mainJs, mainMap); + const inputFn = argv[0]; const mod = runtime.resolveModule(inputFn, cwd + "/"); mod.compileAndRun(); @@ -21,7 +29,13 @@ V8Worker2.recv((ab: ArrayBuffer) => { const msg = pb.Msg.decode(new Uint8Array(ab)); switch (msg.payload) { case "start": - start(msg.start.cwd, msg.start.argv, msg.start.debugFlag); + start( + msg.start.cwd, + msg.start.argv, + msg.start.debugFlag, + msg.start.mainJs, + msg.start.mainMap + ); break; case "timerReady": timers.timerReady(msg.timerReady.id, msg.timerReady.done); |