From 302debebb3a3b765b3d13f3244eb4625d7d610c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Tue, 18 Feb 2020 10:08:18 -0500 Subject: 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 --- cli/compilers/ts.rs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'cli/compilers/ts.rs') 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. -- cgit v1.2.3