diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2020-02-04 20:24:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-04 20:24:33 +0100 |
commit | 184be99f5b6e85a6041e72dfdd0afda46e5f8619 (patch) | |
tree | d438f3ab106d4a515cf05a296a31db206c266d80 /cli/compilers | |
parent | 2ab49a80a62f00e5540907d6d85cf15a9cce070e (diff) |
refactor: CLI subcommands and argv (#3886)
Diffstat (limited to 'cli/compilers')
-rw-r--r-- | cli/compilers/ts.rs | 4 | ||||
-rw-r--r-- | cli/compilers/wasm.rs | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/cli/compilers/ts.rs b/cli/compilers/ts.rs index 27203484f..8517c319b 100644 --- a/cli/compilers/ts.rs +++ b/cli/compilers/ts.rs @@ -241,8 +241,10 @@ impl TsCompiler { /// runtime. fn setup_worker(global_state: ThreadSafeGlobalState) -> CompilerWorker { let (int, ext) = ThreadSafeState::create_channels(); + let entry_point = + ModuleSpecifier::resolve_url_or_path("./__$deno$ts_compiler.ts").unwrap(); let worker_state = - ThreadSafeState::new(global_state.clone(), None, None, int) + ThreadSafeState::new(global_state.clone(), None, entry_point, int) .expect("Unable to create worker state"); // Count how many times we start the compiler worker. diff --git a/cli/compilers/wasm.rs b/cli/compilers/wasm.rs index f165654ff..0cba8118e 100644 --- a/cli/compilers/wasm.rs +++ b/cli/compilers/wasm.rs @@ -7,6 +7,7 @@ use crate::global_state::ThreadSafeGlobalState; use crate::startup_data; use crate::state::*; use deno_core::ErrBox; +use deno_core::ModuleSpecifier; use futures::FutureExt; use serde_derive::Deserialize; use serde_json; @@ -45,8 +46,11 @@ impl WasmCompiler { /// Create a new V8 worker with snapshot of WASM compiler and setup compiler's runtime. fn setup_worker(global_state: ThreadSafeGlobalState) -> CompilerWorker { let (int, ext) = ThreadSafeState::create_channels(); + let entry_point = + ModuleSpecifier::resolve_url_or_path("./__$deno$wasm_compiler.ts") + .unwrap(); let worker_state = - ThreadSafeState::new(global_state.clone(), None, None, int) + ThreadSafeState::new(global_state.clone(), None, entry_point, int) .expect("Unable to create worker state"); // Count how many times we start the compiler worker. |