diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2020-02-18 10:08:18 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-18 10:08:18 -0500 |
commit | 302debebb3a3b765b3d13f3244eb4625d7d610c2 (patch) | |
tree | d54b4d01f391f7396e8f1c92dc2e05c82acc2a8c /cli/compilers/ts.rs | |
parent | 5a3292047c42b8a65d164f127fc57e57046fadf7 (diff) |
refactor: cleanup cli/lib.rs (#4006)
* rename methods on Worker related to module loading
* reorganize cli/lib.rs
* remove cli/progress.rs and cli/shell.rs
Diffstat (limited to 'cli/compilers/ts.rs')
-rw-r--r-- | cli/compilers/ts.rs | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/cli/compilers/ts.rs b/cli/compilers/ts.rs index a6ed8237d..9bfd93eeb 100644 --- a/cli/compilers/ts.rs +++ b/cli/compilers/ts.rs @@ -1,5 +1,6 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. use super::compiler_worker::CompilerWorker; +use crate::colors; use crate::compilers::CompilationResultFuture; use crate::compilers::CompiledModule; use crate::diagnostics::Diagnostic; @@ -372,18 +373,18 @@ impl TsCompiler { let ts_compiler = self.clone(); - let compiling_job = global_state - .progress - .add("Compile", &module_url.to_string()); + eprintln!( + "{} {}", + colors::green("Compile".to_string()), + module_url.to_string() + ); let msg = execute_in_thread(global_state.clone(), req_msg).await?; let json_str = std::str::from_utf8(&msg).unwrap(); if let Some(diagnostics) = Diagnostic::from_emit_result(json_str) { return Err(ErrBox::from(diagnostics)); } - let compiled_module = ts_compiler.get_compiled_module(&source_file_.url)?; - drop(compiling_job); - Ok(compiled_module) + ts_compiler.get_compiled_module(&source_file_.url) } /// Get associated `CompiledFileMetadata` for given module if it exists. |